4877V1完成
This commit is contained in:
@ -1740,9 +1740,9 @@ class BleHelper {
|
||||
bufferHex = bytes.map(b => '0x' + b.toString(16).padStart(2, '0').toUpperCase()).join(' ');
|
||||
}
|
||||
}
|
||||
console.log("准备发送蓝牙指令 - deviceId:", deviceid, "writeServiceId:", writeServiceId, "writeCharactId:", wirteCharactId);
|
||||
console.log("发送数据(Hex):", bufferHex || "(空数据)");
|
||||
console.log("发送数据(原始buffer长度):", buffer ? (buffer.byteLength || buffer.length || 0) : 0);
|
||||
// console.log("准备发送蓝牙指令 - deviceId:", deviceid, "writeServiceId:", writeServiceId, "writeCharactId:", wirteCharactId);
|
||||
// console.log("发送数据(Hex):", bufferHex || "(空数据)");
|
||||
// console.log("发送数据(原始buffer长度):", buffer ? (buffer.byteLength || buffer.length || 0) : 0);
|
||||
if (ms === undefined) {
|
||||
ms = 50;
|
||||
}
|
||||
@ -1831,10 +1831,10 @@ class BleHelper {
|
||||
|
||||
}
|
||||
if (c.Linked) {
|
||||
console.log("蓝牙已连接,直接发送数据");
|
||||
// console.log("蓝牙已连接,直接发送数据");
|
||||
return sendBuffer();
|
||||
} else {
|
||||
console.log("蓝牙未连接,先连接蓝牙再发送数据");
|
||||
// console.log("蓝牙未连接,先连接蓝牙再发送数据");
|
||||
return new Promise((resolve, reject) => {
|
||||
let f = this.data.LinkedList.find((v) => {
|
||||
return v.deviceId == deviceid;
|
||||
|
||||
Reference in New Issue
Block a user