|
|
|
@ -445,13 +445,14 @@ class ConnectionBluetoot extends Component<any, any> {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (deviceInfo.model == "M01") {
|
|
|
|
} else if (deviceInfo.model == "M01") {
|
|
|
|
this.setState({ currentDeviceType: "M01" });
|
|
|
|
this.setState({ currentDeviceType: "M01" });
|
|
|
|
jsonStatus = deviceToolKitInstanceM01.toJsonStatus(value.value);
|
|
|
|
jsonStatus = deviceToolKitInstanceM01.toJsonStatus(value);
|
|
|
|
querySubDeviceArrayBuffer = deviceToolKitInstanceM01.toBleCommand(
|
|
|
|
querySubDeviceArrayBuffer = deviceToolKitInstanceM01.toBleCommand(
|
|
|
|
bleCommandSamples.querySubDevice as any
|
|
|
|
bleCommandSamples.querySubDevice as any
|
|
|
|
);
|
|
|
|
);
|
|
|
|
} else if (deviceInfo.model === "FR200") {
|
|
|
|
} else if (deviceInfo.model === "FR200") {
|
|
|
|
// FR200 不需要查询子设备
|
|
|
|
// FR200 不需要查询子设备
|
|
|
|
jsonStatus = deviceToolKitInstanceFR200.toJsonStatus(value.value);
|
|
|
|
jsonStatus = deviceToolKitInstanceFR200.toJsonStatus(value);
|
|
|
|
|
|
|
|
console.log("FR200 jsonStatus", jsonStatus);
|
|
|
|
this.setState({ currentDeviceType: "FR200" });
|
|
|
|
this.setState({ currentDeviceType: "FR200" });
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// if (querySubDeviceArrayBuffer) this.sendQuerySubDevice(querySubDeviceArrayBuffer)
|
|
|
|
// if (querySubDeviceArrayBuffer) this.sendQuerySubDevice(querySubDeviceArrayBuffer)
|
|
|
|
@ -832,7 +833,6 @@ class ConnectionBluetoot extends Component<any, any> {
|
|
|
|
.catch((e) => {
|
|
|
|
.catch((e) => {
|
|
|
|
// 下发配对指令失败,走重连操作
|
|
|
|
// 下发配对指令失败,走重连操作
|
|
|
|
clearInterval(sendPairingTimer);
|
|
|
|
clearInterval(sendPairingTimer);
|
|
|
|
// wx.closeBLEConnection();
|
|
|
|
|
|
|
|
this.createBLEConnection();
|
|
|
|
this.createBLEConnection();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|