Update 20200911

This commit is contained in:
jomjol
2020-09-11 21:25:41 +02:00
parent 7a7cfb493d
commit 3712c0ea7e
11 changed files with 91 additions and 51 deletions

View File

@@ -400,18 +400,21 @@ void task_reboot(void *pvParameter)
vTaskDelete(NULL); //Delete this task if it exits from the loop above
}
void doReboot(){
LogFile.WriteToFile("Reboot - now");
KillTFliteTasks();
xTaskCreate(&task_reboot, "reboot", configMINIMAL_STACK_SIZE * 64, NULL, 10, NULL);
}
esp_err_t handler_reboot(httpd_req_t *req)
{
LogFile.WriteToFile("handler_reboot");
ESP_LOGI(TAGPARTOTA, "!!! System will restart within 5 sec!!!");
const char* resp_str = "!!! System will restart within 5 sec!!!";
httpd_resp_send(req, resp_str, strlen(resp_str));
KillTFliteTasks();
xTaskCreate(&task_reboot, "reboot", configMINIMAL_STACK_SIZE * 64, NULL, 10, NULL);
doReboot();
return ESP_OK;
}