mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-18 11:02:16 +00:00
allow restarting failed upgrades (fixes an android autobug report)
This commit is contained in:
parent
8dc4492ba3
commit
c370eb4a88
@ -31,6 +31,8 @@ int update_size_callback(uint16_t conn_handle, uint16_t attr_handle, struct ble_
|
||||
if (ctxt->op == BLE_GATT_ACCESS_OP_WRITE_CHR && updateExpectedSize != 0) {
|
||||
updateActualSize = 0;
|
||||
crc.reset();
|
||||
if (Update.isRunning())
|
||||
Update.abort();
|
||||
bool canBegin = Update.begin(updateExpectedSize);
|
||||
DEBUG_MSG("Setting update size %u, result %d\n", updateExpectedSize, canBegin);
|
||||
if (!canBegin) {
|
||||
|
Loading…
Reference in New Issue
Block a user