wifi config while no 4g and wifi
This commit is contained in:
11
main.py
11
main.py
@@ -213,7 +213,16 @@ def cmd_str():
|
||||
pass
|
||||
|
||||
# 6. 启动通信与校准线程
|
||||
_thread.start_new_thread(network_manager.tcp_main, ())
|
||||
# 若已进入 AP 配网兜底(/boot/wifi.ap),则不启动 TCP 主循环;等待用户配网后 reboot。
|
||||
try:
|
||||
if os.path.exists("/boot/wifi.ap"):
|
||||
if logger:
|
||||
logger.warning("[NET] 当前处于 AP 配网模式(/boot/wifi.ap 存在),跳过 TCP 主线程启动")
|
||||
else:
|
||||
_thread.start_new_thread(network_manager.tcp_main, ())
|
||||
except Exception as e:
|
||||
if logger:
|
||||
logger.error(f"[NET] 启动 TCP 主线程失败: {e}")
|
||||
if not config.HARDCODE_LASER_POINT:
|
||||
_thread.start_new_thread(laser_calibration_worker, ())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user