Update Reboot Algo

This commit is contained in:
jomjol
2022-12-28 15:07:45 +01:00
parent 7a1154363b
commit f08e856dfd
4 changed files with 42 additions and 7 deletions

View File

@@ -608,7 +608,15 @@ void task_reboot(void *pvParameter)
esp_camera_deinit();
WIFIDestroy();
vTaskDelay(5000 / portTICK_PERIOD_MS);
// write a reboot, to identify a reboot by purpouse
FILE* pfile = fopen("/sdcard/reboot.txt", "w");
std::string _s_zw= "reboot";
fwrite(_s_zw.c_str(), strlen(_s_zw.c_str()), 1, pfile);
fclose(pfile);
vTaskDelay(5000 / portTICK_PERIOD_MS);
esp_restart(); // Reset type: CPU Reset (Reset both CPUs)
vTaskDelay(5000 / portTICK_PERIOD_MS);