[shutdown] fix bugs

This commit is contained in:
IrvingGao committed 2024-06-18 23:43:25 +08:00
1 parent 800724cb54
commit 29507e676e
2 files changed
+4 -3

No files matched your search

+2 -1
View File
@@ -78,7 +78,8 @@ class OrangePi(BaseHardware):
if press_time_1:
press_duration = (datetime.now() - press_time_1).total_seconds()
# if press_duration > 0.01:
if press_duration > 5:
if press_duration > 3:
self.set_led_on('red')
subprocess.Popen('sudo shutdown now', shell=True)
else:
self.long_power_status = not self.long_power_status