put user code in charge of restarting connect process
This commit is contained in:
parent
2dc81950d4
commit
e36daf874b
1 changed files with 2 additions and 2 deletions
|
@ -69,8 +69,6 @@ void loop(void *p) {
|
|||
ESP_LOGI(TAG, "starting main loop");
|
||||
|
||||
while(true) {
|
||||
vTaskDelay(5000 / portTICK_PERIOD_MS);
|
||||
|
||||
EventBits_t ev_bits = xEventGroupGetBits(wm_event_group);
|
||||
|
||||
if(ev_bits & WIFI_CONNECTED) {
|
||||
|
@ -81,6 +79,8 @@ void loop(void *p) {
|
|||
vTaskDelay(10000 / portTICK_PERIOD_MS);
|
||||
|
||||
ESP_LOGI(TAG, "Attempting reconnect");
|
||||
|
||||
wifi_manager_connect();
|
||||
}
|
||||
|
||||
vTaskDelay(10000 / portTICK_PERIOD_MS);
|
||||
|
|
Loading…
Reference in a new issue