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