def create_parser(): from argparse import ArgumentParser, SUPPRESS from esp8266leds.Common import arg_range, arg_positive parser = ArgumentParser(add_help=False, usage=SUPPRESS, description="Effect options:") parser.add_argument("--huestart", default=0.24, type=arg_positive(float), help="Starting color for VU meter (the color on the bottom)" \ " (default: %(default)s)") parser.add_argument("--hueend", default=0.0, type=arg_positive(float), help="End color for VU meter (the color on the top)" \ " (default: %(default)s)") return parser
def create_parser(): from argparse import ArgumentParser, SUPPRESS from esp8266leds.Common import arg_range, arg_positive parser = ArgumentParser(add_help=False, usage=SUPPRESS, description="Effect options:") parser.add_argument("--huespread", default=0.12, type=arg_positive(float), help="spread of random hue values around 'color'" \ " (default: %(default)s)") parser.add_argument("--max_droplets", default=3, type=arg_positive(), help="maximum number of droplets" \ " (default: %(default)s)") parser.add_argument("--probability", default=0.5, type=arg_positive(float), help="probability of creating a new droplet" \ " (default: %(default)s)") return parser
def create_parser(): from argparse import ArgumentParser, SUPPRESS from esp8266leds.Common import arg_range, arg_positive parser = ArgumentParser(add_help=False, usage=SUPPRESS, description="Effect options:") parser.add_argument("-s", "--stepsize", default=math.pi/1024., type=arg_positive(float), help="rainbow color stepsize (default: math.pi/1024)") return parser
help="set start color/hue, range 0-1" \ " (default: %(default)s)") parser.add_argument("--config", default=os.path.join( os.path.expanduser('~'), '.esp8266leds'), type=str, help="set config file path" \ " (default: %(default)s)") parser.add_argument("-d", "--device", default="huzzah", type=str, help="device name (default: %(default)s)") parser.add_argument("-e", "--effect", default="Rainbow", choices=effects, help="effect name (default: %(default)s)") parser.add_argument("-g", "--grb", action="store_true", help="use GRB order") parser.add_argument("--mirror", action="store_true", help="mirror effect at half of the strip") parser.add_argument("-n", "--nled", default=120, type=arg_positive(), help="set number of leds (default: %(default)s)") parser.add_argument("-o", "--off", action="store_true", help="set leds off and exit") parser.add_argument("--pin", default=1, type=int, help="set led pin number (default: %(default)s)") parser.add_argument("-r", "--rtype", default="mqtt", type=str, choices=["mqtt","udp"], help="set remote host type") parser.add_argument("-m", "--max", default=0.4, type=arg_range(0,1,arg_type=float), help="maximum brightness, range 0-1" \ " (default: %(default)s)") parser.add_argument("--gamma", default=2.2, type=float, help="gamma value" \ " (default: %(default)s)") parser.add_argument("-t", "--time", default=1., type=arg_positive(float),