improved event handling for set-time

This commit is contained in:
Balthasar Reuter
2016-10-05 23:50:04 +02:00
parent 843a9c2dd8
commit b63ffdd1f3
2 changed files with 6 additions and 4 deletions

View File

@@ -10,8 +10,8 @@ from time import sleep, clock
from PIL import Image
from gui import GUI_PyGame as GuiModule
from camera import CameraException, Camera_cv as CameraModule
#from camera import CameraException, Camera_gPhoto as CameraModule
# from camera import CameraException, Camera_cv as CameraModule
from camera import CameraException, Camera_gPhoto as CameraModule
from slideshow import Slideshow
from events import Rpi_GPIO as GPIO

View File

@@ -65,8 +65,10 @@ def main():
digit_done = False
while not digit_done:
event = display.wait_for_event()
digit_done = handle_event(event, digit, date_digits, numpad)
r, e = display.check_for_event()
while r:
digit_done = handle_event(e, digit, date_digits, numpad)
r, e = display.check_for_event()
for digit in range(len(time_digits)):
display.clear()