From 75445f84c5a64ca38aef83d1b9467ea2c902e890 Mon Sep 17 00:00:00 2001 From: IrvingGao <1729854488@qq.com> Date: Tue, 18 Jun 2024 20:57:56 +0800 Subject: [PATCH] [client] fix bugs --- takway/clients/web_socket_client_utils.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/takway/clients/web_socket_client_utils.py b/takway/clients/web_socket_client_utils.py index adb393b..6f11545 100644 --- a/takway/clients/web_socket_client_utils.py +++ b/takway/clients/web_socket_client_utils.py @@ -177,6 +177,11 @@ class WebSocketClinet: if self.wakeup_event.is_set(): print(f"{datetime.now()}: Wake up by button.") else: + if self.sleep_event.is_set(): + print(f"{datetime.now()}: stay sleep mode.") + recorder.hardware.long_power_status = False + self.sleep_event.clear() + continue if recorder.is_wakeup(data): recorder.hardware.long_power_status = True self.wakeup_event.set()