debug: log FFE1 command hex on every writeRawCommand

这个提交包含在:
Guoguo
2026-06-24 04:10:58 -07:00
父节点 a5dacef4a7
当前提交 ca1b9b4377
+3 -1
查看文件
@@ -72,6 +72,7 @@ function writeRawCommand(bytes) {
reject({ error_code: 0xFF, error_msg: 'command characteristic not found' }) reject({ error_code: 0xFF, error_msg: 'command characteristic not found' })
return return
} }
console.log('[BLE] FFE1 发送', bytes.length + '字节', '| hex:', protocol.bytesToHex(bytes))
wx.writeBLECharacteristicValue({ wx.writeBLECharacteristicValue({
deviceId: connection.getDeviceId(), deviceId: connection.getDeviceId(),
serviceId: chars.command.serviceId, serviceId: chars.command.serviceId,
@@ -80,7 +81,8 @@ function writeRawCommand(bytes) {
success: function () { success: function () {
resolve({ message: 'success', bytes: bytes }) resolve({ message: 'success', bytes: bytes })
}, },
fail: function () { fail: function (err) {
console.error('[BLE] FFE1 发送失败', err)
reject({ error_code: 0x0C, error_msg: 'ERR_BLE_DISCONNECTED' }) reject({ error_code: 0x0C, error_msg: 'ERR_BLE_DISCONNECTED' })
} }
}) })