kleine verbesserungen

This commit is contained in:
Patrick Tschuchnig 2019-08-28 08:07:47 +02:00
parent 2286a6c950
commit b701f3215c

View File

@ -90,6 +90,8 @@ def exit_application():
return return
def shutdown_raspberry(): def shutdown_raspberry():
pygame.quit()
GPIO.cleanup()
os.system("sudo shutdown -h now") os.system("sudo shutdown -h now")
return return
@ -107,7 +109,7 @@ screen = pygame.display.set_mode((screenSizeX, screenSizeY), pygame.FULLSCREEN)
while True: # main loop while True: # main loop
#global label storage #global label storage
print("new game running") print("New game starting")
time_surface = 0 time_surface = 0
errors_surface = 0 errors_surface = 0
time_rectangle = 0 time_rectangle = 0
@ -129,13 +131,13 @@ while True: # main loop
#justStarted = True #justStarted = True
header_surface = font.render('Spiel startet', True, mainFontColor) header_surface = font.render('Spiel l' + u'ä' + 'uft!', True, mainFontColor)
time.sleep(5) time.sleep(5)
start_time = int(time.time()) start_time = int(time.time())
while True: # game running while True: # game running
print("game running normally") print("Game running normally")
handle_events() handle_events()
if GPIO.input(errorPin) == True: if GPIO.input(errorPin) == True: