mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-08 12:36:52 +03:00
slow down reboot loops (#1396)
* slow down constant reboots caused by the flow. With this, after a restart due to exception/panic the first round gets delayed by 5 minutes * retry InitCam() if it failed * restart after 5 minutes if NTP init failed * . Co-authored-by: CaCO3 <caco@ruinelli.ch>
This commit is contained in:
@@ -713,6 +713,13 @@ void task_autodoFlow(void *pvParameter)
|
||||
{
|
||||
int64_t fr_start, fr_delta_ms;
|
||||
|
||||
if (esp_reset_reason() == ESP_RST_PANIC) {
|
||||
LogFile.WriteToFile(ESP_LOG_WARN, TAG, "Restarted due to an Exception/panic! Postponing first round start by 5 minutes to allow for an OTA or to fetch the log!");
|
||||
LogFile.WriteToFile(ESP_LOG_WARN, TAG, "Setting logfile level to DEBUG until the next reboot!");
|
||||
LogFile.setLogLevel(ESP_LOG_DEBUG);
|
||||
vTaskDelay(60*5000 / portTICK_RATE_MS); // Wait 5 minutes to give time to do an OTA or fetch the log
|
||||
}
|
||||
|
||||
ESP_LOGD(TAG, "task_autodoFlow: start");
|
||||
doInit();
|
||||
gpio_handler_init();
|
||||
|
||||
Reference in New Issue
Block a user