[client] fix bugs
This commit is contained in:
1 parent
9f36c06428
commit
75445f84c5
1 file changed
+5
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user