[AI Generated]: feat(*): 对接数据页/测量报告真实接口,完善成员管理、蓝牙连接及成员选择抽屉逻辑
This commit is contained in:
@@ -124,7 +124,7 @@ class LeFuService {
|
||||
this._busSubscribed = true
|
||||
|
||||
plugin.bus.subscribe('devicesList', (devList: RawDevice[]) => {
|
||||
console.log(TAG, 'bus[devicesList],设备数:', devList?.length)
|
||||
console.log(TAG, 'bus[devicesList],设备数:', devList?.length, devList)
|
||||
if (!devList?.length) {
|
||||
this._onDevicesListCb?.([])
|
||||
return
|
||||
@@ -190,8 +190,8 @@ class LeFuService {
|
||||
})
|
||||
}
|
||||
|
||||
connect(device: ScannedDevice): void {
|
||||
console.log(TAG, 'connect():', device.name)
|
||||
connect(rawDevice: RawDevice): void {
|
||||
console.log(TAG, 'connect():', rawDevice.name)
|
||||
this._intentionalConnect = true
|
||||
this._stopKeepAlive()
|
||||
this._stopReconnectTimer()
|
||||
@@ -200,8 +200,11 @@ class LeFuService {
|
||||
this._deviceInfo = null
|
||||
this._onDeviceInfoCb = null
|
||||
this._onDeviceConnectCb = null
|
||||
// 直连缓存设备时不走 startScan,需手动初始化插件设备配置和总线订阅
|
||||
plugin.Blue.setDeviceSetting(DEVICE_SETTINGS)
|
||||
this._subscribeBus()
|
||||
plugin.Blue.stopBluetoothDevicesDiscovery()
|
||||
plugin.Blue.createBLEConnection(device.raw)
|
||||
plugin.Blue.createBLEConnection(rawDevice)
|
||||
}
|
||||
|
||||
disconnect(): void {
|
||||
|
||||
Reference in New Issue
Block a user