Prettier
This commit is contained in:
parent
fa1dfe2354
commit
1f59d9cd9a
2 changed files with 9 additions and 11 deletions
|
|
@ -2,11 +2,10 @@
|
|||
|
||||
import argparse
|
||||
import sys
|
||||
from time import sleep
|
||||
|
||||
from bottle import route, run, static_file, template, view
|
||||
from bottle import route, run, static_file, view
|
||||
|
||||
from dmx import DMX, Bar252, StairvilleLedPar56, Steady, RotatingRainbow, REDSpot18RGB, Chase
|
||||
from dmx import DMX, Bar252, StairvilleLedPar56, Steady, RotatingRainbow, REDSpot18RGB, Chase, FadeTo
|
||||
|
||||
|
||||
@route('/')
|
||||
|
|
@ -20,7 +19,6 @@ def static(path):
|
|||
|
||||
@route('/api/state/<state>')
|
||||
def update(state):
|
||||
print(f"state -> {state}")
|
||||
if state == "off":
|
||||
dmx.setAnimation(Steady(0, 0, 0))
|
||||
elif state == "white":
|
||||
|
|
@ -71,7 +69,7 @@ def main(args):
|
|||
else:
|
||||
print(f"Unknown room {args.room}", file=sys.stderr)
|
||||
sys.exit(64)
|
||||
dmx.update()
|
||||
dmx.setAnimation(FadeTo(128, 128, 128))
|
||||
dmx.start()
|
||||
|
||||
run(host='0.0.0.0', port=8080, reloader=False)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue