issues!
This commit is contained in:
parent
88660fc4b1
commit
6e72ca1999
1 changed files with 6 additions and 5 deletions
11
leds.py
11
leds.py
|
@ -65,17 +65,18 @@ def loop():
|
|||
socket_thread = threading.Thread(target=socket_loop)
|
||||
socket_thread.start()
|
||||
lcd = lcd_manager.Adafruit_CharLCD()
|
||||
lights = light_manager.LightStrip()
|
||||
this.lights = lights
|
||||
this.lights = light_manager.LightStrip()
|
||||
this.lights
|
||||
this.lights.set_pattern(pattern.pat)
|
||||
while True:
|
||||
logger.debug("loop")
|
||||
lights.tick()
|
||||
this.lights.tick()
|
||||
query()
|
||||
state = get_state()
|
||||
|
||||
if state == "level":
|
||||
if lights.get_light_level() != (this.level / this.level_max):
|
||||
lights.set_light_level(this.level / this.level_max)
|
||||
if this.lights.get_light_level() != (this.level / this.level_max):
|
||||
this.lights.set_light_level(this.level / this.level_max)
|
||||
lightlevel(lcd, this.level)
|
||||
elif state == "color":
|
||||
color(lcd)
|
||||
|
|
Loading…
Reference in a new issue