swap SCANNING/IDLE bits weather ap found or not
This commit is contained in:
parent
ccffb2229f
commit
f1ff7079fa
1 changed files with 3 additions and 2 deletions
|
@ -102,11 +102,12 @@ static esp_err_t wifi_event_handler(void *ctx, system_event_t *event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
found:
|
found:
|
||||||
if(ap_store.last != -1) {
|
|
||||||
ESP_LOGI(TAG, "Got matching ESSID: %s", ap_store.aps[ap_store.last].ssid);
|
|
||||||
xEventGroupClearBits(wm_event_group, WIFI_SCANNING);
|
xEventGroupClearBits(wm_event_group, WIFI_SCANNING);
|
||||||
xEventGroupSetBits(wm_event_group, WIFI_IDLE);
|
xEventGroupSetBits(wm_event_group, WIFI_IDLE);
|
||||||
|
|
||||||
|
if(ap_store.last != -1) {
|
||||||
|
ESP_LOGI(TAG, "Got matching ESSID: %s", ap_store.aps[ap_store.last].ssid);
|
||||||
|
|
||||||
wifi_manager_connect();
|
wifi_manager_connect();
|
||||||
} else {
|
} else {
|
||||||
ESP_LOGI(TAG, "No matching APs found");
|
ESP_LOGI(TAG, "No matching APs found");
|
||||||
|
|
Loading…
Reference in a new issue