threading

This commit is contained in:
jane 2020-11-08 02:43:11 -05:00
parent add30ca301
commit 88660fc4b1
2 changed files with 3 additions and 1 deletions

View file

@ -62,6 +62,8 @@ def socket_loop():
def loop(): def loop():
socket_thread = threading.Thread(target=socket_loop)
socket_thread.start()
lcd = lcd_manager.Adafruit_CharLCD() lcd = lcd_manager.Adafruit_CharLCD()
lights = light_manager.LightStrip() lights = light_manager.LightStrip()
this.lights = lights this.lights = lights

View file

@ -54,7 +54,7 @@ class LightStrip:
col = self.cur_pattern[i] col = self.cur_pattern[i]
self.cur_index = i self.cur_index = i
logger.debug("TEST VALUES: np {} col {} same {}".format( 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: if tuple(np[i]) != col:
changes = changes + 1 changes = changes + 1
np[i] = col np[i] = col