fix logging
This commit is contained in:
parent
da255625c9
commit
2bd3645d90
2 changed files with 5 additions and 5 deletions
6
leds.py
6
leds.py
|
@ -23,7 +23,7 @@ this.color_state = 0
|
|||
|
||||
|
||||
def lightlevel(lcd, level):
|
||||
logging.debug("display level")
|
||||
logger.debug("display level")
|
||||
lcd.clear()
|
||||
lcd.message("Light Level:\n]" + "-"*level + "[")
|
||||
|
||||
|
@ -35,7 +35,7 @@ def query():
|
|||
def color(lcd):
|
||||
lcd.clear()
|
||||
lcd.message("new pattern loaded.")
|
||||
logging.debug("NYI")
|
||||
logger.debug("NYI")
|
||||
|
||||
|
||||
def get_state():
|
||||
|
@ -66,7 +66,7 @@ def loop():
|
|||
lights = light_manager.LightStrip()
|
||||
this.lights = lights
|
||||
while True:
|
||||
logging.debug("loop")
|
||||
logger.debug("loop")
|
||||
lights.tick()
|
||||
query()
|
||||
state = get_state()
|
||||
|
|
|
@ -53,12 +53,12 @@ class LightStrip:
|
|||
for i in range(ind, n):
|
||||
col = self.cur_pattern[i]
|
||||
self.cur_index = i
|
||||
logging.debug("TEST VALUES: np {} col {} same {}".format(
|
||||
logger.debug("TEST VALUES: np {} col {} same {}".format(
|
||||
np[i], col, tuple(np[i]) != col))
|
||||
if tuple(np[i]) != col:
|
||||
changes = changes + 1
|
||||
np[i] = col
|
||||
logging.debug(
|
||||
logger.debug(
|
||||
"CHANGE COLOR OF PIXEL {} TO {} ON TICK {}".format(i, col, t))
|
||||
if changes >= self.max_changes:
|
||||
break
|
||||
|
|
Loading…
Reference in a new issue