fixed some symboles gone wrong from copying
This commit is contained in:
@@ -26,9 +26,9 @@ def set_display(enable):
|
||||
|
||||
|
||||
def check_timeout():
|
||||
if timer >= TIMEOUT and display:
|
||||
if timer >= TIMEOUT and display:
|
||||
set_display(False)
|
||||
elif not display and timer < TIMEOUT:
|
||||
elif not display and timer < TIMEOUT:
|
||||
set_display(True)
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ if __name__ == "__main__":
|
||||
GPIO.add_event_detect(PIR_GPIO, GPIO.RISING, callback=motion)
|
||||
while True:
|
||||
time.sleep(1)
|
||||
if timer < TIMEOUT:
|
||||
if timer < TIMEOUT:
|
||||
timer += 1
|
||||
check_timeout()
|
||||
except KeyboardInterrupt:
|
||||
|
Reference in New Issue
Block a user