From 88660fc4b198199f91ccaccec56231dd2c1664a9 Mon Sep 17 00:00:00 2001 From: Jane Petrovna Date: Sun, 8 Nov 2020 02:43:11 -0500 Subject: [PATCH] threading --- leds.py | 2 ++ light_manager.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/leds.py b/leds.py index 826f509..7c9ede8 100644 --- a/leds.py +++ b/leds.py @@ -62,6 +62,8 @@ def socket_loop(): def loop(): + socket_thread = threading.Thread(target=socket_loop) + socket_thread.start() lcd = lcd_manager.Adafruit_CharLCD() lights = light_manager.LightStrip() this.lights = lights diff --git a/light_manager.py b/light_manager.py index f9efc5e..789b9e7 100644 --- a/light_manager.py +++ b/light_manager.py @@ -54,7 +54,7 @@ class LightStrip: col = self.cur_pattern[i] self.cur_index = i logger.debug("TEST VALUES: np {} col {} same {}".format( - np[i], col, tuple(np[i]) != col)) + tuple(np[i]), col, tuple(np[i]) != col)) if tuple(np[i]) != col: changes = changes + 1 np[i] = col