1
0
forked from dyf/APP

4877V1完成

This commit is contained in:
liub
2025-11-10 17:27:37 +08:00
parent 012eca6985
commit 1ad1ae0ac9
9 changed files with 396 additions and 102 deletions

View File

@ -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;