diff options
Diffstat (limited to 'turtetris_slave')
-rw-r--r-- | turtetris_slave/__init__.py | 2 | ||||
-rw-r--r-- | turtetris_slave/leds.py | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/turtetris_slave/__init__.py b/turtetris_slave/__init__.py index 5779dee..d5dd129 100644 --- a/turtetris_slave/__init__.py +++ b/turtetris_slave/__init__.py @@ -23,7 +23,7 @@ def main(): while True: msg = sck.recv_string() print(msg) - json0 = msg.find(' ') # First empty char is end of envelope + json0 = msg.find(' ') # First empty char is end of envelope leds.output(json.loads(msg[json0:])) diff --git a/turtetris_slave/leds.py b/turtetris_slave/leds.py index cdafca2..3075827 100644 --- a/turtetris_slave/leds.py +++ b/turtetris_slave/leds.py @@ -3,7 +3,7 @@ from subprocess import call def prepare(): "Prepare leds" - call("rainbow all enable intensity 10 FFFFFF", shell=True) + call("rainbow all enable FFFFFF", shell=True) def clear(): @@ -32,7 +32,5 @@ def output(data): args = ['rainbow'] for i in range(0, 12): args.append(__MAP__[i]) - args.append(str(data[i]['color'])) - args.append('intensity') - args.append(str(data[i]['intens'])) + args.append(str(data[i])) call(args) |