diff --git a/WiFiManager.cpp b/WiFiManager.cpp index 4bb391d..5026b7d 100644 --- a/WiFiManager.cpp +++ b/WiFiManager.cpp @@ -2757,6 +2757,22 @@ void WiFiManager::setShowInfoUpdate(boolean enabled){ _showInfoUpdate = enabled; } +/** + * check if the config portal is running + * @return bool true if active + */ +bool WiFiManager::getConfigPortalActive(){ + return configPortalActive; +} + +/** + * [getConfigPortalActive description] + * @return bool true if active + */ +bool WiFiManager::getWebPortalActive(){ + return webPortalActive; +} + /** * set menu items and order * if param is present in menu , params will be removed from wifi page automatically diff --git a/WiFiManager.h b/WiFiManager.h index 944dab5..1a6c31f 100644 --- a/WiFiManager.h +++ b/WiFiManager.h @@ -361,6 +361,12 @@ class WiFiManager // set port of webserver, 80 void setHttpPort(uint16_t port); + // check if config portal is active (true) + bool getConfigPortalActive(); + + // check if web portal is active (true) + bool getWebPortalActive(); + std::unique_ptr dnsServer; #if defined(ESP32) && defined(WM_WEBSERVERSHIM) @@ -640,10 +646,7 @@ class WiFiManager // DEBUG_WM("NO fromString METHOD ON IPAddress, you need ESP8266 core 2.1.0 or newer for Custom IP configuration to work."); return false; } - - public: - inline bool isConfigPortalActive() { return configPortalActive; } - inline bool isWebPortalActive() { return webPortalActive; } + }; #endif