diff --git a/code/components/fileserver_ota/server_ota.cpp b/code/components/fileserver_ota/server_ota.cpp index 5381c3c54..c6efe57b6 100644 --- a/code/components/fileserver_ota/server_ota.cpp +++ b/code/components/fileserver_ota/server_ota.cpp @@ -245,7 +245,7 @@ void checkOTAUpdate() deleteFile("/sdcard/update.txt"); // Prevent Boot Loop!!! LogFile.writeToFile(ESP_LOG_INFO, TAG, "Prepare update process | File: " + file_name_update); - xTaskCreate(&task_ota_update, "task_ota_update", configMINIMAL_STACK_SIZE * 35, NULL, tskIDLE_PRIORITY+1, NULL); + xTaskCreate(&task_ota_update, "task_ota_update", configMINIMAL_STACK_SIZE * 35, NULL, tskIDLE_PRIORITY + 1, NULL); while(1) { // wait until reboot within task_do_update vTaskDelay(1000 / portTICK_PERIOD_MS); diff --git a/code/components/mainprocess_ctrl/MainFlowControl.cpp b/code/components/mainprocess_ctrl/MainFlowControl.cpp index e46f9580f..021ca3b0c 100644 --- a/code/components/mainprocess_ctrl/MainFlowControl.cpp +++ b/code/components/mainprocess_ctrl/MainFlowControl.cpp @@ -1198,6 +1198,8 @@ void task_autodoFlow(void *pvParameter) LogFile.writeToFile(ESP_LOG_ERROR, TAG, "taskAutoFlowState: Invalid state called. Programming error"); flowctrl.setActualProcessState(std::string(FLOW_INVALID_STATE)); } + + taskYIELD(); } // Delete task if it exits from the loop above @@ -1216,7 +1218,7 @@ void createMainFlowTask() LogFile.writeToFile(ESP_LOG_INFO, TAG, "Process state: " + std::string(FLOW_CREATE_FLOW_TASK)); flowctrl.setActualProcessState(std::string(FLOW_CREATE_FLOW_TASK)); - BaseType_t xReturned = xTaskCreatePinnedToCore(&task_autodoFlow, "task_autodoFlow", 12 * 1024, NULL, tskIDLE_PRIORITY+2, &xHandletask_autodoFlow, 0); + BaseType_t xReturned = xTaskCreatePinnedToCore(&task_autodoFlow, "task_autodoFlow", 12 * 1024, NULL, tskIDLE_PRIORITY + 3, &xHandletask_autodoFlow, 0); if( xReturned != pdPASS ) { LogFile.writeToFile(ESP_LOG_ERROR, TAG, "Failed to create task_autodoFlow"); LogFile.writeHeapInfo("CreateFlowTask: Failed to create task"); diff --git a/code/components/misc_helper/statusled.cpp b/code/components/misc_helper/statusled.cpp index 67609d7b3..9bdc08dc1 100644 --- a/code/components/misc_helper/statusled.cpp +++ b/code/components/misc_helper/statusled.cpp @@ -123,7 +123,7 @@ void setStatusLed(StatusLedSource _eSource, int _iCode, bool _bInfinite) } else if (xHandle_task_StatusLED == NULL) { StatusLEDData.bProcessingRequest = true; - BaseType_t xReturned = xTaskCreate(&task_StatusLED, "task_StatusLED", 1280, NULL, tskIDLE_PRIORITY+1, &xHandle_task_StatusLED); + BaseType_t xReturned = xTaskCreate(&task_StatusLED, "task_StatusLED", 1280, NULL, tskIDLE_PRIORITY + 1, &xHandle_task_StatusLED); if(xReturned != pdPASS) { xHandle_task_StatusLED = NULL; diff --git a/code/components/misc_helper/system.cpp b/code/components/misc_helper/system.cpp index 4116d0652..2587d3868 100644 --- a/code/components/misc_helper/system.cpp +++ b/code/components/misc_helper/system.cpp @@ -115,7 +115,7 @@ void taskSocTemp(void *pvParameter) void initSOCTemperatureSensor() { // Create a dedicated task to ensure access temperature ressource only from a single source - BaseType_t xReturned = xTaskCreate(&taskSocTemp, "taskSocTemp", 2048, NULL, tskIDLE_PRIORITY+1, NULL); + BaseType_t xReturned = xTaskCreate(&taskSocTemp, "taskSocTemp", 2048, NULL, tskIDLE_PRIORITY + 1, NULL); if( xReturned != pdPASS ) { LogFile.writeToFile(ESP_LOG_ERROR, TAG, "Failed to create taskSocTemp"); diff --git a/code/components/wlan_ctrl/improvWifiProvisioning.cpp b/code/components/wlan_ctrl/improvWifiProvisioning.cpp index ad047c34b..34c220e4a 100644 --- a/code/components/wlan_ctrl/improvWifiProvisioning.cpp +++ b/code/components/wlan_ctrl/improvWifiProvisioning.cpp @@ -100,6 +100,7 @@ static void improvTask(void *pvParameters) { while (true) { improvEventHandler(); + taskYIELD(); } } @@ -315,7 +316,7 @@ void improvInit(void) } #endif // USB_SERIAL - BaseType_t xReturned = xTaskCreate(&improvTask, "improv", 4 * 1024, NULL, tskIDLE_PRIORITY + 4, &improvTaskHandle); + BaseType_t xReturned = xTaskCreate(&improvTask, "improv", 4 * 1024, NULL, tskIDLE_PRIORITY + 1, &improvTaskHandle); if (xReturned != pdPASS) { LogFile.writeToFile(ESP_LOG_ERROR, TAG, "Failed to create task 'improv'"); }