This commit is contained in:
Stefan Bethke 2022-07-22 17:56:53 +02:00
parent 1f59d9cd9a
commit d4166db9ab
2 changed files with 3 additions and 2 deletions

2
dmx.py
View file

@ -94,7 +94,7 @@ class RotatingRainbow:
return rgb return rgb
def __str__(self): def __str__(self):
return "{type(self).__name__}" return f"{type(self).__name__}"
class Chase(Steady): class Chase(Steady):

View file

@ -34,12 +34,13 @@ def update(state):
dmx.start() dmx.start()
return {'result': 'ok'} return {'result': 'ok'}
def main(args): def main(args):
global dmx global dmx
parser = argparse.ArgumentParser(prog='foobazdmx', description='Make the lights flicker.') parser = argparse.ArgumentParser(prog='foobazdmx', description='Make the lights flicker.')
parser.add_argument('-a', '--artnet', type=str, required=True, help="Art-Net server") parser.add_argument('-a', '--artnet', type=str, required=True, help="Art-Net server")
parser.add_argument('-r', '--room', type=str, required=True, help="light setup for room") parser.add_argument('-r', '--room', type=str, required=True, help="light setup for room: shop or big")
args = parser.parse_args(args) args = parser.parse_args(args)
artnet = args.artnet artnet = args.artnet