From b13787b70410b51d6f1cd952ae41c943cf3cdf85 Mon Sep 17 00:00:00 2001 From: chopster44 Date: Sun, 30 Nov 2025 21:11:31 +0000 Subject: [PATCH] (1.0.20) bump --- dist/index.cjs.js | 3 ++- dist/index.es.js | 3 ++- package.json | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dist/index.cjs.js b/dist/index.cjs.js index 7b7d62c..04048df 100644 --- a/dist/index.cjs.js +++ b/dist/index.cjs.js @@ -175,11 +175,12 @@ class Updater { } async sendNextPacket() { let packet = this.file.slice(this._fileProgress, this._fileProgress + this._packetSize); + this._fileProgress += this._packetSize; return new Promise((resolve, reject) => { this.bleObject.write(this.bleDeviceId, this._updaterServiceUUID, this._updateFileCharacteristicUUID, packet.buffer, () => { - this._fileProgress += this._packetSize; resolve(true); }, (error) => { + this._fileProgress -= this._packetSize; reject(error); }); }); diff --git a/dist/index.es.js b/dist/index.es.js index 97c7544..be84531 100644 --- a/dist/index.es.js +++ b/dist/index.es.js @@ -173,11 +173,12 @@ class Updater { } async sendNextPacket() { let packet = this.file.slice(this._fileProgress, this._fileProgress + this._packetSize); + this._fileProgress += this._packetSize; return new Promise((resolve, reject) => { this.bleObject.write(this.bleDeviceId, this._updaterServiceUUID, this._updateFileCharacteristicUUID, packet.buffer, () => { - this._fileProgress += this._packetSize; resolve(true); }, (error) => { + this._fileProgress -= this._packetSize; reject(error); }); }); diff --git a/package.json b/package.json index e1f82e1..1004479 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "updaterweblibrary", - "version": "1.0.19", + "version": "1.0.20", "description": "OTA Updater App frontend library", "repository": { "type": "git",