[bug] short button
This commit is contained in:
parent
cb5836a9be
commit
3007313694
|
@ -69,7 +69,7 @@ class OrangePi(BaseHardware):
|
||||||
|
|
||||||
self.start_status_light()
|
self.start_status_light()
|
||||||
while True:
|
while True:
|
||||||
button_status_1 = wiringpi.digitalRead(self.BUTTON_PIN_1)
|
button_status_1 = True if wiringpi.digitalRead(self.BUTTON_PIN_1) == 0 else False
|
||||||
if not button_status_1 and last_status_1:
|
if not button_status_1 and last_status_1:
|
||||||
press_time_1 = datetime.now()
|
press_time_1 = datetime.now()
|
||||||
elif button_status_1 and not last_status_1:
|
elif button_status_1 and not last_status_1:
|
||||||
|
|
Loading…
Reference in New Issue