ticker process closed when screen turned off

This commit is contained in:
Neythen Treloar 2022-02-21 18:59:50 +00:00
parent d9fad15db5
commit 1872899226

View File

@ -206,13 +206,14 @@ def stop():
ticker.sendline('K') ticker.sendline('K')
if not displaying_screensaver: if not displaying_screensaver:
time.sleep(1) # give time for leds to turn off
ticker.close() ticker.close()
else: else:
screensaver_p.close() screensaver_p.close()
if not ticker_stopped: if not ticker_stopped:
time.sleep(2) # give time for leds to turn off time.sleep(1) # give time for leds to turn off
ticker.close() ticker.close()
ticker_stopped = True ticker_stopped = True