From 9e2086611ca0d63439c792fb5f1050df54ee46c1 Mon Sep 17 00:00:00 2001 From: Patrick Tschuchnig Date: Wed, 11 Sep 2019 10:05:22 +0200 Subject: [PATCH] fixed incorrect variable name --- gametest_rev1.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gametest_rev1.py b/gametest_rev1.py index 3aa5e96..6a13d1a 100644 --- a/gametest_rev1.py +++ b/gametest_rev1.py @@ -452,6 +452,7 @@ while True: pygame.display.flip() if GPIO.input(pin_start) == True and pin_start_inhibit == False and game_running == False: #wait for the user to press start button + print("start pin has been detected, starting game") game_running = True # set an inhibitor bit to stop the contact from possibly vibrating and @@ -473,7 +474,7 @@ while True: # if the start pin is inhibited and at least 3 seconds have passed, # stop blocking the pin if pin_start_inhibit == True: - if (pygame.time.get_ticks()-start_ticks)/1000 > 3: + if ((pygame.time.get_ticks()-pin_start_inhibit_timer_start)/1000) > 3: pin_start_inhibit = False