From a7d588005740f477535946f028f7a33e575f2ab7 Mon Sep 17 00:00:00 2001 From: chopster44 Date: Mon, 1 Dec 2025 18:40:16 +0000 Subject: [PATCH] (1.0.30) bump --- dist/index.cjs.js | 6 ++++-- dist/index.es.js | 6 ++++-- package.json | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dist/index.cjs.js b/dist/index.cjs.js index d8a1949..a8ee5ae 100644 --- a/dist/index.cjs.js +++ b/dist/index.cjs.js @@ -175,9 +175,12 @@ class Updater { } async sendNextPacket() { let packet = this.file.slice(this._fileProgress, this._fileProgress + this._packetSize); - this._fileProgress += this._packetSize; + // this._fileProgress += this._packetSize; return new Promise((resolve, reject) => { this.bleObject.writeWithoutResponse(this.bleDeviceId, this._updaterServiceUUID, this._updateFileCharacteristicUUID, packet.buffer, () => { + console.log("Wrote"); + console.log(packet.length); + this._fileProgress += packet.length; resolve(true); }, (error) => { this._fileProgress -= this._packetSize; @@ -205,7 +208,6 @@ class Updater { this._packetSize = mtu; this.bleObject.startNotification(this.bleDeviceId, this._updaterServiceUUID, this._updaterCommandCharacterisitcUUID, (rawData) => { let dataView = new Uint8Array(rawData); - console.log(dataView); if (dataView[0] == 1) { // send file this.sendNextPacket(); diff --git a/dist/index.es.js b/dist/index.es.js index be9d667..39cc726 100644 --- a/dist/index.es.js +++ b/dist/index.es.js @@ -173,9 +173,12 @@ class Updater { } async sendNextPacket() { let packet = this.file.slice(this._fileProgress, this._fileProgress + this._packetSize); - this._fileProgress += this._packetSize; + // this._fileProgress += this._packetSize; return new Promise((resolve, reject) => { this.bleObject.writeWithoutResponse(this.bleDeviceId, this._updaterServiceUUID, this._updateFileCharacteristicUUID, packet.buffer, () => { + console.log("Wrote"); + console.log(packet.length); + this._fileProgress += packet.length; resolve(true); }, (error) => { this._fileProgress -= this._packetSize; @@ -203,7 +206,6 @@ class Updater { this._packetSize = mtu; this.bleObject.startNotification(this.bleDeviceId, this._updaterServiceUUID, this._updaterCommandCharacterisitcUUID, (rawData) => { let dataView = new Uint8Array(rawData); - console.log(dataView); if (dataView[0] == 1) { // send file this.sendNextPacket(); diff --git a/package.json b/package.json index 8bf6c16..8439f1b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "updaterweblibrary", - "version": "1.0.29", + "version": "1.0.30", "description": "OTA Updater App frontend library", "repository": { "type": "git",