100J还差语音文件蓝牙上传
This commit is contained in:
@ -954,6 +954,21 @@ class BleHelper {
|
||||
|
||||
} else {
|
||||
console.log("蓝牙连接已恢复", res);
|
||||
// 系统级连接恢复:更新 LinkedList 并通知业务层,避免 sendData 误判未连接而重复 createBLEConnection
|
||||
let f = this.data.LinkedList.find(v => v.deviceId == res.deviceId);
|
||||
if (f) {
|
||||
f.Linked = true;
|
||||
this.updateCache();
|
||||
}
|
||||
if (this.cfg.recoveryCallback.length > 0) {
|
||||
this.cfg.recoveryCallback.forEach(c => {
|
||||
try {
|
||||
c.callback({ deviceId: res.deviceId, connected: true });
|
||||
} catch (err) {
|
||||
console.error("执行蓝牙恢复连接的回调异常", err);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}, 50);
|
||||
|
||||
Reference in New Issue
Block a user