diff --git a/preload/apps/g_watch/__init__.py b/preload/apps/g_watch/__init__.py index eae7bb6e87d182c9da45f619d0eb19d2ed4f45ef..9ff50df8cdde4d65ab44729911f41b910dc9a851 100644 --- a/preload/apps/g_watch/__init__.py +++ b/preload/apps/g_watch/__init__.py @@ -27,6 +27,8 @@ DIGITS = [ DOW = ["Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"] +DEBUG_LEDS = False + led_count = 11 b7 = 255 # brightness of 7-segment display 0...255 @@ -153,7 +155,6 @@ with display.open() as disp: leds.dim_top(2) leds_on = 0 - p_leds_on = 0 while True: time.sleep(0.1) @@ -177,9 +178,8 @@ with display.open() as disp: # ---------------------------------------- read buttons pressed = buttons.read(buttons.BOTTOM_LEFT | buttons.BOTTOM_RIGHT) - p_leds_on = leds_on - if pressed & buttons.BOTTOM_LEFT != 0: + if DEBUG_LEDS and pressed & buttons.BOTTOM_LEFT != 0: leds_on = 0 disp.clear() disp.print("LEDS OFF", posx=40, posy=30, font=2) @@ -192,7 +192,7 @@ with display.open() as disp: leds.update() disp.update() - if pressed & buttons.BOTTOM_RIGHT != 0: + if DEBUG_LEDS and pressed & buttons.BOTTOM_RIGHT != 0: leds_on = 1 disp.clear() disp.print("LEDS ON", posx=40, posy=30, font=2)