qr timeout
This commit is contained in:
parent
efa8995887
commit
6768852636
@ -114,6 +114,7 @@ class Fotobox:
|
||||
self._choice: Photo | None = None
|
||||
self._countdown_timer: Timer = Timer("countdown", 0, 1, COUNTDOWN_COUNT + 1, self._countdown_callback)
|
||||
self._shooting_timer: Timer = Timer("shooting", 0, SHOOTING_INTERVAL, SHOOTING_COUNT, self._shooting_callback)
|
||||
self._qr_timer: Timer = Timer("qr", 0, QR_TIMEOUT, 1, self._qr_callback)
|
||||
|
||||
self._fotobox_uuid = read("./data/fotobox.uuid")
|
||||
print("Starting fotobox: F-%s" % self._fotobox_uuid)
|
||||
@ -164,6 +165,9 @@ class Fotobox:
|
||||
self._draw_live_frame()
|
||||
pygame.display.flip()
|
||||
|
||||
def _qr_callback(self):
|
||||
self._set_state(State.IDLE)
|
||||
|
||||
def run(self):
|
||||
if DEBUG:
|
||||
self._set_state(State.SHOOTING)
|
||||
|
||||
@ -20,6 +20,7 @@ PHOTO_HEIGHT = 1944
|
||||
SHOOTING_COUNT: int = 1 if DEBUG else 2
|
||||
SHOOTING_INTERVAL: float = 0 if DEBUG else 1.75
|
||||
COUNTDOWN_COUNT: int = 0 if DEBUG else 3
|
||||
QR_TIMEOUT: int = 3
|
||||
|
||||
CHOICE_BORDER: int = 5
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user