file progress in more places

This commit is contained in:
2025-11-30 21:47:47 +00:00
parent e5912cd94e
commit 3e7c26e3ba

View File

@@ -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