Sfoglia il codice sorgente

Keep MainFlowTask alive to handle reboot (#2325)

Slider0007 2 anni fa
parent
commit
19158c998f
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  1. 6 0
      code/components/jomjol_flowcontroll/MainFlowControl.cpp

+ 6 - 0
code/components/jomjol_flowcontroll/MainFlowControl.cpp

@@ -1014,6 +1014,12 @@ void task_autodoFlow(void *pvParameter)
             vTaskDelay( xDelay );        
         }
     }
+
+    while(1) // Keep flow task running to handle necessary sub tasks like reboot handler, etc..
+    {
+        vTaskDelay(2000 / portTICK_PERIOD_MS); 
+    }
+
     vTaskDelete(NULL); //Delete this task if it exits from the loop above
     xHandletask_autodoFlow = NULL;
     ESP_LOGD(TAG, "task_autodoFlow: end");