move core wifi init stuff to _start
This commit is contained in:
parent
ad29c7077e
commit
c4913a64f7
1 changed files with 2 additions and 2 deletions
|
@ -102,8 +102,6 @@ uint8_t wifi_manager_add_ap(char *ssid, char *password) {
|
||||||
};
|
};
|
||||||
|
|
||||||
void wifi_manager_connect() {
|
void wifi_manager_connect() {
|
||||||
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
|
|
||||||
ESP_ERROR_CHECK(esp_wifi_init(&cfg));
|
|
||||||
wifi_config_t wifi_config = {
|
wifi_config_t wifi_config = {
|
||||||
.sta = {
|
.sta = {
|
||||||
}
|
}
|
||||||
|
@ -212,6 +210,8 @@ EventGroupHandle_t wifi_manager_start() {
|
||||||
|
|
||||||
tcpip_adapter_init();
|
tcpip_adapter_init();
|
||||||
ESP_ERROR_CHECK(esp_event_loop_init(wifi_event_handler, NULL) );
|
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));
|
||||||
|
|
||||||
xTaskCreate(&wifi_manager_main_loop, "wm_main_loop", 4096, NULL, 6, NULL);
|
xTaskCreate(&wifi_manager_main_loop, "wm_main_loop", 4096, NULL, 6, NULL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue