qr timeout 3
This commit is contained in:
parent
6ad4a82d47
commit
5a9188c22b
@ -166,6 +166,7 @@ class Fotobox:
|
|||||||
pygame.display.flip()
|
pygame.display.flip()
|
||||||
|
|
||||||
def _qr_callback(self):
|
def _qr_callback(self):
|
||||||
|
print("QR TIMEOUT")
|
||||||
self._set_state(State.IDLE)
|
self._set_state(State.IDLE)
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
@ -296,7 +297,6 @@ class Fotobox:
|
|||||||
else:
|
else:
|
||||||
self._choice = None
|
self._choice = None
|
||||||
elif new_state == State.QR:
|
elif new_state == State.QR:
|
||||||
self._qr_timer.restart()
|
|
||||||
screen.fill((0, 0, 0))
|
screen.fill((0, 0, 0))
|
||||||
screen.blit(LOADING_SURFACE, LOADING_RECT)
|
screen.blit(LOADING_SURFACE, LOADING_RECT)
|
||||||
pygame.display.flip()
|
pygame.display.flip()
|
||||||
@ -316,6 +316,8 @@ class Fotobox:
|
|||||||
self.save(self._choice.photo_image, "", False)
|
self.save(self._choice.photo_image, "", False)
|
||||||
self.save(self._choice.framed_image, "framed", True)
|
self.save(self._choice.framed_image, "framed", True)
|
||||||
|
|
||||||
|
self._qr_timer.restart()
|
||||||
|
|
||||||
def save(self, img: Image, suffix: str, do_upload: bool):
|
def save(self, img: Image, suffix: str, do_upload: bool):
|
||||||
filename = "F-%s---R%04d-%s---S%04d-%s---P%04d-%s---%s%s.jpg" % (
|
filename = "F-%s---R%04d-%s---S%04d-%s---P%04d-%s---%s%s.jpg" % (
|
||||||
self._fotobox_uuid,
|
self._fotobox_uuid,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user