修复不关机补充

This commit is contained in:
yrx
2026-06-23 11:09:33 +08:00
parent 02d3e18d35
commit 440e34097c
5 changed files with 16 additions and 9 deletions

View File

@@ -275,6 +275,11 @@ def cmd_str():
hardware_manager.start_idle_timer()
if logger:
_auto_power_off = int(getattr(config, "AUTO_POWER_OFF_IN_SECONDS", 0) or 0)
if _auto_power_off <= 0:
logger.info("[MAIN] 自动关机已禁用 (AUTO_POWER_OFF_IN_SECONDS=0)")
else:
logger.info(f"[MAIN] 自动关机: {_auto_power_off} 秒无活动")
logger.info("系统准备完成...")
last_adc_trigger = 0