From 8df00320b5f6bd473d41a83161d3a761166400fa Mon Sep 17 00:00:00 2001 From: Gustavo Gomez Lopez De San Roman Date: Mon, 4 Sep 2023 14:22:42 +0200 Subject: [PATCH] Revert "fix: removing of ble devices when upgrade (#498)" (#502) This reverts commit 8e17024647412c2d7d36e5ed1489d9f749872543. --- src/api/flash/defyFlasher/NRf52833-flasher.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/api/flash/defyFlasher/NRf52833-flasher.js b/src/api/flash/defyFlasher/NRf52833-flasher.js index 16602d4bd..21e90ee1f 100644 --- a/src/api/flash/defyFlasher/NRf52833-flasher.js +++ b/src/api/flash/defyFlasher/NRf52833-flasher.js @@ -230,19 +230,14 @@ const NRf52833 = { //ERASE device func_array.push(function (callback) { - const lastAddres = dataObjects[dataObjects.length-1].address; - const sizeHex = lastAddres - (lastAddres%1024)+1024; - write_cb( - str2ab(`E${num2hexstr(dataObjects[0].address, 8)},${num2hexstr(sizeHex, 8)}#`), - callback - ); + write_cb(str2ab("E" + num2hexstr(dataObjects[0].address, 8) + "#"), callback); }); func_array.push(callback => { read_cb(callback); }); var state = 1, - stateT = 50; + stateT = 50; while (total > 0) { let bufferSize = total < PACKET_SIZE ? total : PACKET_SIZE;