(1.0.20) bump
This commit is contained in:
3
dist/index.cjs.js
vendored
3
dist/index.cjs.js
vendored
@@ -175,11 +175,12 @@ class Updater {
|
|||||||
}
|
}
|
||||||
async sendNextPacket() {
|
async sendNextPacket() {
|
||||||
let packet = this.file.slice(this._fileProgress, this._fileProgress + this._packetSize);
|
let packet = this.file.slice(this._fileProgress, this._fileProgress + this._packetSize);
|
||||||
|
this._fileProgress += this._packetSize;
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
this.bleObject.write(this.bleDeviceId, this._updaterServiceUUID, this._updateFileCharacteristicUUID, packet.buffer, () => {
|
this.bleObject.write(this.bleDeviceId, this._updaterServiceUUID, this._updateFileCharacteristicUUID, packet.buffer, () => {
|
||||||
this._fileProgress += this._packetSize;
|
|
||||||
resolve(true);
|
resolve(true);
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
|
this._fileProgress -= this._packetSize;
|
||||||
reject(error);
|
reject(error);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
3
dist/index.es.js
vendored
3
dist/index.es.js
vendored
@@ -173,11 +173,12 @@ class Updater {
|
|||||||
}
|
}
|
||||||
async sendNextPacket() {
|
async sendNextPacket() {
|
||||||
let packet = this.file.slice(this._fileProgress, this._fileProgress + this._packetSize);
|
let packet = this.file.slice(this._fileProgress, this._fileProgress + this._packetSize);
|
||||||
|
this._fileProgress += this._packetSize;
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
this.bleObject.write(this.bleDeviceId, this._updaterServiceUUID, this._updateFileCharacteristicUUID, packet.buffer, () => {
|
this.bleObject.write(this.bleDeviceId, this._updaterServiceUUID, this._updateFileCharacteristicUUID, packet.buffer, () => {
|
||||||
this._fileProgress += this._packetSize;
|
|
||||||
resolve(true);
|
resolve(true);
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
|
this._fileProgress -= this._packetSize;
|
||||||
reject(error);
|
reject(error);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "updaterweblibrary",
|
"name": "updaterweblibrary",
|
||||||
"version": "1.0.19",
|
"version": "1.0.20",
|
||||||
"description": "OTA Updater App frontend library",
|
"description": "OTA Updater App frontend library",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
Reference in New Issue
Block a user