Prechádzať zdrojové kódy

feature: 解决数据处理报错的问题

Damon 7 mesiacov pred
rodič
commit
13e638dad1
2 zmenil súbory, kde vykonal 537 pridanie a 511 odobranie
  1. 535 510
      devices/bluetooth/bt_parse.js
  2. 2 1
      utils/blue_ble/util.js

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 535 - 510
devices/bluetooth/bt_parse.js


+ 2 - 1
utils/blue_ble/util.js

@@ -85,6 +85,7 @@ class BleUtil {
             return;
           }
           const hex_util = require('./../../utils/hex_util');
+          const bt_parse = require('./../../devices/bluetooth/bt_parse');
           that.manager.onBLECharacteristicValueChange(function (value) {
             var receiveText = hex_util.buf2string(value);
             console.log('接收到数据文字:' + receiveText);
@@ -94,7 +95,7 @@ class BleUtil {
             for (let i = 0; i < buffer.byteLength; i++) {
               result.push(buffer.getUint8(i))
             }
-            BtParse.parseTLV(result);
+            bt_parse.parseTLV(result);
           });
         },
         function () {