move wifi_connect

This commit is contained in:
Morgan Allen 2018-10-09 21:15:27 -07:00
parent 3c778c4c9c
commit e31719fb1e

View file

@ -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);