fix wifi 2 pkg issue

This commit is contained in:
gcw_4spBpAfv
2026-04-03 15:40:07 +08:00
parent 685dce2519
commit bdc3254ed2
4 changed files with 345 additions and 251 deletions

View File

@@ -115,6 +115,15 @@ def cmd_str():
# 2. 从4G模块同步系统时间需要 at_client 已初始化)
sync_system_time_from_4g()
# 2.1 WiFi 热点配网兜底:仅当 STA 与 4G 均不可用时起 AP + HTTP提交后删 /boot/wifi.ap、建 wifi.sta 并 reboot
try:
from wifi_config_httpd import maybe_start_wifi_ap_fallback
maybe_start_wifi_ap_fallback(logger)
except Exception as e:
if logger:
logger.error(f"[WIFI-AP] 兜底配网检测/启动失败: {e}")
# 2.5. 启动存图 worker 线程(队列 + worker避免主循环阻塞
start_save_shot_worker()