Commit 50382e07 authored by 薛小虎's avatar 薛小虎

feat: wifi升级失败,5s后重启

parent 02bb448c
...@@ -144,6 +144,16 @@ void simple_ota_example_task(void *pvParameter) ...@@ -144,6 +144,16 @@ void simple_ota_example_task(void *pvParameter)
esp_restart(); esp_restart();
} else { } else {
ESP_LOGE(TAG, "Firmware upgrade failed"); ESP_LOGE(TAG, "Firmware upgrade failed");
for(i = 5; i > 0; i--)
{
printf("============ System will restart in %d second. ============\n", i);
vTaskDelay(1000 / portTICK_PERIOD_MS);
}
// printf("============ System rebooting... ============\n");
// printf("==========================================================\n");
// printf("\n");
esp_restart();
} }
while (1) { while (1) {
vTaskDelay(1000 / portTICK_PERIOD_MS); vTaskDelay(1000 / portTICK_PERIOD_MS);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment