Even After configuring the ROLLBACK macro in the sdk config. My App is not going into self diagnosis code . This one:
Code: Select all
if (esp_ota_get_state_partition(running, &ota_state) == ESP_OK) {
ESP_LOGI(TAG, "Get State Partition was Successfull");
if (ota_state == ESP_OTA_IMG_PENDING_VERIFY) {
// run diagnostic function ...
bool diagnostic_is_ok = true;
if (diagnostic_is_ok) {
ESP_LOGI(TAG, "Diagnostics completed successfully! Continuing execution ...");
esp_ota_mark_app_valid_cancel_rollback();
} else {
ESP_LOGE(TAG, "Diagnostics failed! Start rollback to the previous version ...");
esp_ota_mark_app_invalid_rollback_and_reboot();
}
}
}