From 300731369495301731de232c599644ee2366378c Mon Sep 17 00:00:00 2001 From: IrvingGao <1729854488@qq.com> Date: Thu, 30 May 2024 01:57:15 +0800 Subject: [PATCH] [bug] short button --- takway/board/orangepi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/takway/board/orangepi.py b/takway/board/orangepi.py index 0685ea2..e4da1c8 100644 --- a/takway/board/orangepi.py +++ b/takway/board/orangepi.py @@ -69,7 +69,7 @@ class OrangePi(BaseHardware): self.start_status_light() 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: press_time_1 = datetime.now() elif button_status_1 and not last_status_1: