修复八电极蓝牙对接流程
This commit is contained in:
parent
a161319690
commit
4ff1bb8e67
|
|
@ -79,7 +79,9 @@ Page({
|
|||
if (!device.name && !device.localName) {
|
||||
return
|
||||
}
|
||||
if (device.name.indexOf('AiLink_') != -1) {
|
||||
console.log("name", device.name)
|
||||
if (device.name.indexOf('AiLink_') != -1 || device.name.toLowerCase().indexOf(
|
||||
'pcf01') != -1) {
|
||||
wx.stopBluetoothDevicesDiscovery() //搜索到名称为“AiLink_”的蓝牙后,停止搜寻附近的蓝牙
|
||||
const foundDevices = this.data.devices
|
||||
const idx = inArray(foundDevices, 'deviceId', device.deviceId)
|
||||
|
|
@ -222,7 +224,9 @@ Page({
|
|||
let sex = "0x01"
|
||||
let age = "0x" + A.toString(16)
|
||||
let height = "0x" + H.toString(16)
|
||||
let arr = [0x01, parseInt(sex), parseInt(age), parseInt(height),0x00]
|
||||
let arr = [0x01, parseInt(sex), parseInt(age), parseInt(height),
|
||||
0x00
|
||||
]
|
||||
plugin.sendDataOfA7(arr)
|
||||
console.log("握手成功", arr)
|
||||
} else if (bleData.status == 1) {
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -291,11 +291,11 @@ Page({
|
|||
})
|
||||
}
|
||||
}
|
||||
if (typeInfo == "05") {
|
||||
let mcu = payload.substring(4, 6)
|
||||
let imp = parseInt(payload.substring(6, 14), 16)
|
||||
console.log("阻抗类型:", payload, type, typeInfo, mcu,imp) //阻抗模式
|
||||
}
|
||||
// if (typeInfo == "05") {
|
||||
// let mcu = payload.substring(4, 6)
|
||||
// let imp = parseInt(payload.substring(6, 14), 16)
|
||||
// console.log("阻抗类型:", payload, type, typeInfo, mcu,imp) //阻抗模式
|
||||
// }
|
||||
}
|
||||
if (type == "0f") {
|
||||
that.setData({
|
||||
|
|
|
|||
Binary file not shown.
Loading…
Reference in New Issue