qr timeout - cancel in IDLE mode

This commit is contained in:
Patrick Haßel 2025-06-28 09:00:17 +02:00
parent 11701f58b8
commit 0a2770351d
2 changed files with 15 additions and 10 deletions

View File

@ -277,7 +277,9 @@ class Fotobox:
def _set_state(self, new_state: State):
print(new_state)
self._state = new_state
if new_state == State.COUNTDOWN:
if new_state == State.IDLE:
self._qr_timer.cancel()
elif new_state == State.COUNTDOWN:
led_border(True)
self._countdown_timer.restart()
elif new_state == State.SHOOTING:

View File

@ -32,6 +32,9 @@ class Timer:
if self._callback:
self._callback()
def cancel(self):
self._enabled = False
def current(self):
return self._current