Trigger reboot after successful OTA end
Added reboot call after successful OTA finalization. Signed-off-by: Niel Nielsen <nieldk@gmail.com>
This commit is contained in:
1 parent
4fde8a0aa7
commit
516f11a351
1 file changed
+7
@@ -3958,6 +3958,13 @@ static void PacketReceived(PacketCommandNG *packet) {
|
||||
break;
|
||||
case BWM_OTA_ACTION_END:
|
||||
res = bwm_esp_ota_end();
|
||||
if (res == PM3_SUCCESS) {
|
||||
// Finalize succeeded and the new partition is now marked
|
||||
// bootable; the ESP won't switch to it on its own, so
|
||||
// kick the reboot here (DEV.md 12.8). Best-effort: don't
|
||||
// fail the whole OTA over a lost reboot ack.
|
||||
(void)bwm_esp_reboot();
|
||||
}
|
||||
break;
|
||||
default:
|
||||
res = PM3_EINVARG;
|
||||
|
||||
Reference in new issue
Block a user