1
0
forked from dyf/APP

添加全局蓝牙

This commit is contained in:
liub
2025-08-12 15:27:14 +08:00
parent 47a9dace85
commit d9a28d0345
53 changed files with 363 additions and 224 deletions

View File

@ -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地址:", )