feat(app_update): esp_ota_mark_app_invalid_rollback() without reboot (IDFGH-14234) #15030
+26
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
In our application we perform Bluetooth OTAs through a mobile app, reconnecting after the initial OTA to confirm the update as valid or rollback if other issues were encountered.
Currently the only API available to mark the app as invalid is
esp_ota_mark_app_invalid_rollback_and_reboot()
, which immediately callsesp_restart()
on success. This results in the Bluetooth connection being cut short and prevents other app cleanup from happening that we would otherwise do during a cooperative reboot request.This PR simply extracts the call to
esp_restart()
toesp_ota_mark_app_invalid_rollback_and_reboot()
itself, and provides anesp_ota_mark_app_invalid_rollback()
function that does not restart.Checklist
Before submitting a Pull Request, please ensure the following: