[client] fix bugs

This commit is contained in:
IrvingGao 2024-06-18 20:57:56 +08:00
parent 9f36c06428
commit 75445f84c5
1 changed files with 5 additions and 0 deletions

View File

@ -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()