diff --git a/include/esp32-wifi-manager.h b/include/esp32-wifi-manager.h index 278ebd4..986ac95 100644 --- a/include/esp32-wifi-manager.h +++ b/include/esp32-wifi-manager.h @@ -12,6 +12,7 @@ void wifi_manager_reset_store(); #define AP_AVAILABLE (BIT2) #define WIFI_IDLE (BIT3) #define WIFI_SCANNING (BIT4) +#define WM_GOT_IP (BIT7) uint8_t wifi_manager_ap_count(); uint8_t wifi_manager_add_ap(char *essid, char *password); diff --git a/main/esp32-wifi-manager.c b/main/esp32-wifi-manager.c index 6ac5db7..de37a33 100644 --- a/main/esp32-wifi-manager.c +++ b/main/esp32-wifi-manager.c @@ -61,6 +61,8 @@ static esp_err_t wifi_event_handler(void* arg, esp_event_base_t event_base, int3 ESP_LOGI(TAG, "SYSTEM_EVENT_STA_GOT_IP"); ESP_LOGI(TAG, "Got IP: %s\n", ip4addr_ntoa(&event->ip_info.ip)); + + xEventGroupSetBits(wm_event_group, WM_GOT_IP); } else if(event_id == SYSTEM_EVENT_STA_DISCONNECTED) { wifi_event_sta_disconnected_t *event = ( wifi_event_sta_disconnected_t*)event_data;