fix: align provisioning logic with base devices
This commit is contained in:
@@ -124,6 +124,7 @@ class ProvisionManager extends EventEmitter {
|
||||
if (this._state === 'ap') return;
|
||||
|
||||
led.off(); // AP 模式:WiFi 未连接,WiFi 灯熄灭
|
||||
if (!hasInternet()) led.display.showAP(); // 无网时立即显示 AP,有线时等 WS 连接后再定
|
||||
|
||||
try {
|
||||
// 若上次进程退出前留下 clawd-hotspot,必须先释放 wlan0;否则会在 AP 模式下扫描,列表可能只剩 2.4G/自身热点。
|
||||
@@ -148,7 +149,6 @@ class ProvisionManager extends EventEmitter {
|
||||
this._server.startListening();
|
||||
|
||||
this._state = 'ap';
|
||||
led.display.showAP();
|
||||
this._apStartedAt = Date.now();
|
||||
this._lastApSavedWifiRetryAt = 0;
|
||||
log.info('provision', `AP 常驻模式已启动: ${ap.ssid}, 密码 12345678`);
|
||||
|
||||
Reference in New Issue
Block a user