常规小优化
This commit is contained in:
@ -731,7 +731,7 @@
|
||||
dataView.setUint8(4 + i, '0x' + packetData[i]);
|
||||
}
|
||||
|
||||
let inteval = 40;
|
||||
let inteval = 60;
|
||||
|
||||
ble.sendData(f.deviceId, buffer, f.writeServiceId, f
|
||||
.wirteCharactId, 10).then(() => {
|
||||
@ -739,7 +739,7 @@
|
||||
updateLoading(these, {
|
||||
text: "正在发送:" + currentPacket + "/" +
|
||||
totalPackets
|
||||
})
|
||||
});
|
||||
|
||||
currentPacket++;
|
||||
|
||||
@ -750,7 +750,7 @@
|
||||
if (err.code == '10007') { //遇到这个错误自动重新发送
|
||||
console.log(err.errMsg + ",发送失败了,正在补偿:" +
|
||||
currentPacket);
|
||||
setTimeout(sendNextVideoPacket, inteval);
|
||||
setTimeout(sendNextVideoPacket, 800);
|
||||
} else {
|
||||
|
||||
hideLoading(these);
|
||||
@ -848,13 +848,12 @@
|
||||
|
||||
Promise.all([p1, p2]).then((arr) => {
|
||||
|
||||
if (arr[0].status == 'rejected') {
|
||||
showPop({
|
||||
message: "设备准备未就绪",
|
||||
iconUrl: "/static/images/common/uploadErr.png",
|
||||
borderColor: "#e034344d",
|
||||
buttonBgColor: "#E03434",
|
||||
}, these);
|
||||
if (arr[0].status == 'rejected') {
|
||||
MsgError("设备准备未就绪,请重试",'',these);
|
||||
return;
|
||||
}
|
||||
if(arr[1].status== 'rejected'){
|
||||
MsgError("读取视频失败",'',these);
|
||||
return;
|
||||
}
|
||||
let res = arr[1];
|
||||
@ -1333,17 +1332,16 @@
|
||||
];
|
||||
|
||||
let item3 = Object.assign({}, json);
|
||||
item3.textAlign='center';
|
||||
item3.name = 'media';
|
||||
item3.title = '选择媒体';
|
||||
item3.menuItems = [{
|
||||
text: '照片',
|
||||
icon: '/static/images/lightImg/qiang.png',
|
||||
text: '照片',
|
||||
value: 'img',
|
||||
key: 'media'
|
||||
},
|
||||
{
|
||||
text: '动画',
|
||||
icon: '/static/images/lightImg/qiang.png',
|
||||
value: 'flash',
|
||||
key: 'media'
|
||||
}
|
||||
@ -1636,14 +1634,14 @@
|
||||
setTimeout(() => {
|
||||
Promise.allSettled([holdHand('word transmit start', 2200), drawText()]).then(results => {
|
||||
if (results[0].status == 'rejected') {
|
||||
|
||||
MsgError("与蓝牙设备握手失败,请重试",'',these);
|
||||
setTimeout(() => {
|
||||
hideLoading(these)
|
||||
}, 500);
|
||||
return;
|
||||
}
|
||||
if (results[1].status == 'rejected') {
|
||||
|
||||
MsgError("读取文字点阵失败,请重试",'',these);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user