添加全局蓝牙
This commit is contained in:
@ -410,9 +410,8 @@
|
||||
var these = this;
|
||||
|
||||
|
||||
var parseData = (
|
||||
bytes) => {
|
||||
|
||||
var parseData = () => {
|
||||
let bytes=receive.bytes;
|
||||
if (bytes[0] == 0x55) {
|
||||
try {
|
||||
let staticLevelByte = bytes[1];
|
||||
@ -483,14 +482,13 @@
|
||||
} catch (error) {
|
||||
console.error('数据解析错误:', error);
|
||||
}
|
||||
} else {
|
||||
}
|
||||
if(receive.str)
|
||||
{
|
||||
try {
|
||||
let uint8Array = new Uint8Array(receive.value);
|
||||
let str = '';
|
||||
for (let i = 0; i < uint8Array.length; i++) {
|
||||
// 将每个字节转换为对应的字符
|
||||
str += String.fromCharCode(uint8Array[i]);
|
||||
}
|
||||
|
||||
let str = receive.str;
|
||||
|
||||
if (str.indexOf('mac address:') == 0) {
|
||||
these.formData.macAddress = str.split(':')[1];
|
||||
console.log("收到mac地址:", )
|
||||
|
Reference in New Issue
Block a user