From bd9fbc5c8c9b45e9727a824dd4e165435c09e3e4 Mon Sep 17 00:00:00 2001 From: zw_git <459788263@qq.com> Date: Wed, 15 Sep 2021 20:44:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=90=AF=E5=8A=A8=E6=8C=87?= =?UTF-8?q?=E7=BA=B9=E4=B8=8B=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/asyntest/asyntest.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/pages/asyntest/asyntest.js b/pages/asyntest/asyntest.js index f0733ff..5e1cf77 100644 --- a/pages/asyntest/asyntest.js +++ b/pages/asyntest/asyntest.js @@ -167,22 +167,21 @@ Page({ }, 1000); let cmd = 0x29 - let dn = util.stringToUint8ArrayWithPadding(deviceNum, 20, 'F') - let data = 0x00360008 - - let length = 1 + 20 + 4 + 1 + 1 + let dn = util.stringToUint8ArrayWithPadding(deviceNum, 20, 0xff) + let length = 1 + 20 + 5 + 1 + 1 let b = new Uint8Array(length) b[0] = cmd b.set(dn, 1) - - b[21] = (data>>24)&0xff; - b[22] = (data>>16)&0xff; - b[23] = (data>>8)&0xff; - b[24] = data&0xff; - b[25] = 0x03 - b[26] = 0x01 + b[21] = 0x00 + b[22] = 0x36 + b[23] = 0x00 + b[24] = 0x00 + b[25] = 0x08 + + b[26] = 0x03 + b[27] = 0x01 console.log(b) app.globalData.ble.send(cmd, b, length)