fixed incorrect variable name
This commit is contained in:
		| @@ -452,6 +452,7 @@ while True: | |||||||
|             pygame.display.flip() |             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 |         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 |                 game_running = True | ||||||
|  |  | ||||||
|                 # set an inhibitor bit to stop the contact from possibly vibrating and |                 # 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, |                 # if the start pin is inhibited and at least 3 seconds have passed, | ||||||
|                 # stop blocking the pin |                 # stop blocking the pin | ||||||
|                 if pin_start_inhibit == True: |                 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 |                         pin_start_inhibit = False | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user