From e31719fb1edfdcc2d93041895d04c65a1f9ecd0e Mon Sep 17 00:00:00 2001 From: Morgan Allen Date: Tue, 9 Oct 2018 21:15:27 -0700 Subject: [PATCH] move wifi_connect --- main/esp32-wifi-manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/esp32-wifi-manager.c b/main/esp32-wifi-manager.c index e04cfd3..0b9346c 100644 --- a/main/esp32-wifi-manager.c +++ b/main/esp32-wifi-manager.c @@ -140,7 +140,6 @@ void wifi_manager_main_loop() { ) { ESP_LOGI(TAG, "AP Available, starting WiFi connect"); - wifi_manager_connect(); } vTaskDelay(3000 / portTICK_PERIOD_MS); @@ -222,6 +221,7 @@ EventGroupHandle_t wifi_manager_start() { ESP_ERROR_CHECK(esp_event_loop_init(wifi_event_handler, NULL) ); wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT(); ESP_ERROR_CHECK(esp_wifi_init(&cfg)); + ESP_ERROR_CHECK(esp_wifi_start()); xTaskCreate(&wifi_manager_main_loop, "wm_main_loop", 4096, NULL, 6, NULL);