mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-10 05:26:52 +03:00
Update server_ota.cpp
This commit is contained in:
@@ -598,6 +598,12 @@ void hard_restart()
|
|||||||
|
|
||||||
void task_reboot(void *pvParameter)
|
void task_reboot(void *pvParameter)
|
||||||
{
|
{
|
||||||
|
// 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);
|
||||||
|
|
||||||
KillTFliteTasks(); // Kill autoflow task
|
KillTFliteTasks(); // Kill autoflow task
|
||||||
|
|
||||||
/* Stop service tasks */
|
/* Stop service tasks */
|
||||||
@@ -608,14 +614,6 @@ void task_reboot(void *pvParameter)
|
|||||||
esp_camera_deinit();
|
esp_camera_deinit();
|
||||||
WIFIDestroy();
|
WIFIDestroy();
|
||||||
|
|
||||||
|
|
||||||
// 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);
|
vTaskDelay(5000 / portTICK_PERIOD_MS);
|
||||||
esp_restart(); // Reset type: CPU Reset (Reset both CPUs)
|
esp_restart(); // Reset type: CPU Reset (Reset both CPUs)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user