main/task_wifi.c

changeset 18
12506716211c
parent 15
64028e178ff1
child 22
9c0bcc91fe1a
--- a/main/task_wifi.c	Thu Apr 06 13:22:03 2023 +0200
+++ b/main/task_wifi.c	Thu Apr 06 20:49:52 2023 +0200
@@ -19,9 +19,6 @@
 	.ssid = ESP_WIFI_SSID,
         .password = ESP_WIFI_PASS,
 	.scan_method = WIFI_FAST_SCAN,
-        .sort_method = WIFI_CONNECT_AP_BY_SECURITY,
-        .threshold.rssi = -127,
-        .threshold.authmode = WIFI_AUTH_WPA2_PSK,
    },
 };
 WIFI_State			*wifi_state = NULL;		///< Public state for other tasks.
@@ -187,7 +184,7 @@
     esp_event_handler_instance_t instance_any_id;
     esp_event_handler_instance_t instance_got_ip;
     ESP_ERROR_CHECK(esp_event_handler_instance_register(WIFI_EVENT, ESP_EVENT_ANY_ID, &wifi_event_handler, NULL, &instance_any_id) );
-    ESP_ERROR_CHECK(esp_event_handler_instance_register(IP_EVENT, /*IP_EVENT_STA_GOT_IP*/ ESP_EVENT_ANY_ID, &got_ip_event_handler, NULL, &instance_got_ip) );
+    ESP_ERROR_CHECK(esp_event_handler_instance_register(IP_EVENT,  ESP_EVENT_ANY_ID, &got_ip_event_handler, NULL, &instance_got_ip) );
 
     ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA));
     ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_STA, &wifi_Config) );

mercurial