From a41c0001c310930f4b0894c8f2ce1917c9eb4b41 Mon Sep 17 00:00:00 2001 From: IrvingGao <1729854488@qq.com> Date: Fri, 24 May 2024 23:04:09 +0800 Subject: [PATCH] [bug] board --- takway/board/orangepi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/takway/board/orangepi.py b/takway/board/orangepi.py index 4e13de1..20e7413 100644 --- a/takway/board/orangepi.py +++ b/takway/board/orangepi.py @@ -75,10 +75,10 @@ class OrangePi(BaseHardware): press_duration = (datetime.now() - press_time_1).total_seconds() print(f"{datetime.now()}: press_duration: {press_duration}") if press_duration > 1: - self.long_power_status = ~self.long_power_status + self.long_power_status = not self.long_power_status print(f"{datetime.now()}: long_power_status: {self.long_power_status} {self.short_power_status}") else: - self.short_power_status = ~self.short_power_status + self.short_power_status = not self.short_power_status print(f"{datetime.now()}: short_power_status: {self.short_power_status} {self.long_power_status}") press_time_1 = None