[bug] short button
This commit is contained in:
parent
3007313694
commit
f57c68c3a2
|
@ -70,6 +70,7 @@ class OrangePi(BaseHardware):
|
||||||
self.start_status_light()
|
self.start_status_light()
|
||||||
while True:
|
while True:
|
||||||
button_status_1 = True if wiringpi.digitalRead(self.BUTTON_PIN_1) == 0 else False
|
button_status_1 = True if wiringpi.digitalRead(self.BUTTON_PIN_1) == 0 else False
|
||||||
|
print(f"{datetime.now()}: BUTTON_PIN_1: {wiringpi.digitalRead(self.BUTTON_PIN_1)}")
|
||||||
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