解决安卓数据包问题,拆成小包发送,增加电量,续航时间,充电检测
This commit is contained in:
@ -1222,7 +1222,7 @@ class BleHelper {
|
||||
}
|
||||
setTimeout(function() {
|
||||
startgetService(id);
|
||||
}, 100);
|
||||
}, 1000);
|
||||
}
|
||||
},
|
||||
fail: (ex) => {
|
||||
@ -1410,11 +1410,16 @@ class BleHelper {
|
||||
// .LinkedList);
|
||||
|
||||
// 处理 MTU 设置
|
||||
if (plus.os.name === 'Android') {
|
||||
this.setMtu(deviceId);
|
||||
}
|
||||
if (plus.os.name === 'Android') {
|
||||
this.setMtu(deviceId).then(() => {
|
||||
resolve(true);
|
||||
}).catch(() => {
|
||||
resolve(true); //mtu设置失败也算成功
|
||||
})
|
||||
} else {
|
||||
resolve(true);
|
||||
|
||||
}
|
||||
|
||||
}).catch((ex) => {
|
||||
reject(this.getError(ex));
|
||||
});
|
||||
|
||||
@ -50,7 +50,7 @@ class BleReceive {
|
||||
ReceiveData(receive,f,path,recArr) {
|
||||
if(f && f.macAddress && f.device && f.device.id){
|
||||
let data={};
|
||||
if(f.device.detailPageUrl=='/pages/6155/deviceDetail'){
|
||||
if(f.device.detailPageUrl=='/pages/6155/deviceDetail' || f.device.detailPageUrl=='/pages/7305/BJQ7305'){
|
||||
// console.log("该设备是6155");
|
||||
data= this.Receive_6155(receive,f,path,recArr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user