Skip to content

Commit edff2da

Browse files
committed
control.py: Allow to stop blinking when timer runs out
Previously it wasn't able to be canceled. Signed-off-by: Daniel Schaefer <dhs@frame.work>
1 parent 49ba7dd commit edff2da

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

control.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,11 @@ def countdown(seconds):
597597
def blinking():
598598
"""Blink brightness high/off every second.
599599
Keeps currently displayed grid"""
600+
global STOP_THREAD
600601
while True:
602+
if STOP_THREAD:
603+
STOP_THREAD = False
604+
return
601605
brightness(0)
602606
time.sleep(0.5)
603607
brightness(200)

0 commit comments

Comments
 (0)