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,10 +102,11 @@ static esp_err_t wifi_event_handler(void *ctx, system_event_t *event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
found:
|
found:
|
||||||
|
xEventGroupClearBits(wm_event_group, WIFI_SCANNING);
|
||||||
|
xEventGroupSetBits(wm_event_group, WIFI_IDLE);
|
||||||
|
|
||||||
if(ap_store.last != -1) {
|
if(ap_store.last != -1) {
|
||||||
ESP_LOGI(TAG, "Got matching ESSID: %s", ap_store.aps[ap_store.last].ssid);
|
ESP_LOGI(TAG, "Got matching ESSID: %s", ap_store.aps[ap_store.last].ssid);
|
||||||
xEventGroupClearBits(wm_event_group, WIFI_SCANNING);
|
|
||||||
xEventGroupSetBits(wm_event_group, WIFI_IDLE);
|
|
||||||
|
|
||||||
wifi_manager_connect();
|
wifi_manager_connect();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue