From db94a61575edb193fe271aac4aa6869e00fa3e9c Mon Sep 17 00:00:00 2001 From: Morgan Allen Date: Tue, 9 Oct 2018 21:21:40 -0700 Subject: [PATCH] think this is the proper way to check.... --- main/esp32-wifi-manager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/esp32-wifi-manager.c b/main/esp32-wifi-manager.c index 0b9346c..146ed6a 100644 --- a/main/esp32-wifi-manager.c +++ b/main/esp32-wifi-manager.c @@ -136,8 +136,8 @@ void wifi_manager_main_loop() { EventBits_t ev_bits = xEventGroupGetBits(wm_event_group); if(ev_bits & AP_AVAILABLE && - !(ev_bits & (WIFI_SCANNING|WIFI_CONNECTED|WIFI_CONNECTING)) - ) { + ((ev_bits & (WIFI_SCANNING|WIFI_CONNECTED|WIFI_CONNECTING)) == 0) + ) { ESP_LOGI(TAG, "AP Available, starting WiFi connect"); }