Mercurial > code > home > repos > light9
diff bin/staticclient @ 1858:7772cc48e016
reformat all python
Ignore-this: 1135b78893f8b3d31badddda7f45678f
author | drewp@bigasterisk.com |
---|---|
date | Tue, 21 May 2019 23:56:12 +0000 |
parents | c78a8f8a08ec |
children | f066d6e874db |
line wrap: on
line diff
--- a/bin/staticclient Tue May 21 23:55:35 2019 +0000 +++ b/bin/staticclient Tue May 21 23:56:12 2019 +0000 @@ -16,7 +16,8 @@ if __name__ == "__main__": parser = OptionParser(usage="%prog") - parser.add_option('--chan', help='channel number, starts at 1', type=int) #todo: or name or uri + parser.add_option('--chan', help='channel number, starts at 1', + type=int) #todo: or name or uri parser.add_option('--level', help='0..1', type=float) parser.add_option('-v', action='store_true', help="log debug level") @@ -26,9 +27,11 @@ levels = [0] * (opts.chan - 1) + [opts.level] log.info('staticclient will write this forever: %r', levels) + def write(): log.debug('writing %r', levels) dmxclient.outputlevels(levels, twisted=1) + log.info('looping...') task.LoopingCall(write).start(1) reactor.run()