file progress in more places
This commit is contained in:
@@ -241,7 +241,7 @@ export default class Updater {
|
|||||||
// write file length
|
// write file length
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
// set mtu
|
// set mtu
|
||||||
this.bleObject.requestMtu(this.bleDeviceId, this._packetSize, (mtu: number) => { this._packetSize = mtu}, () =>{ })
|
this.bleObject.requestMtu(this.bleDeviceId, this._packetSize, (mtu: number) => { this._packetSize = mtu}, () =>{});
|
||||||
// start notify
|
// start notify
|
||||||
this.bleObject.startNotification(this.bleDeviceId, this._updaterServiceUUID, this._updaterCommandCharacterisitcUUID,
|
this.bleObject.startNotification(this.bleDeviceId, this._updaterServiceUUID, this._updaterCommandCharacterisitcUUID,
|
||||||
(rawData: ArrayBuffer): void => {
|
(rawData: ArrayBuffer): void => {
|
||||||
@@ -278,7 +278,7 @@ export default class Updater {
|
|||||||
}
|
}
|
||||||
} else if (dataView[0] == 15) {
|
} else if (dataView[0] == 15) {
|
||||||
// error cmd
|
// error cmd
|
||||||
progressCallback(`Error on remote`);
|
progressCallback(`Error on remote: ${this._fileProgress} / ${this._fileSize}`);
|
||||||
reject("Error on remote");
|
reject("Error on remote");
|
||||||
} else if (dataView[0] == 0) {
|
} else if (dataView[0] == 0) {
|
||||||
// ignore no command
|
// ignore no command
|
||||||
|
|||||||
Reference in New Issue
Block a user