Fix wifi crashing because stack overflow and fix esp_ota cancelling when starting from factory
This commit is contained in:
@@ -168,8 +168,16 @@ extern "C" void app_main()
|
||||
|
||||
printf("Connected!\n");
|
||||
|
||||
// Mark the current app as valid to cancel rollback
|
||||
esp_ota_mark_app_valid_cancel_rollback();
|
||||
// Mark the current app as valid to cancel rollback, only if it's an OTA app
|
||||
{
|
||||
const esp_partition_t *running = esp_ota_get_running_partition();
|
||||
if (running != NULL &&
|
||||
running->subtype >= ESP_PARTITION_SUBTYPE_APP_OTA_MIN &&
|
||||
running->subtype < ESP_PARTITION_SUBTYPE_APP_OTA_MAX)
|
||||
{
|
||||
esp_ota_mark_app_valid_cancel_rollback();
|
||||
}
|
||||
}
|
||||
|
||||
// Start the webserver
|
||||
web_server = start_webserver();
|
||||
|
||||
Reference in New Issue
Block a user