Skip to content
This repository has been archived by the owner on Feb 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2 from smoca-ag/adding_flag
Browse files Browse the repository at this point in the history
Adding flag
  • Loading branch information
pfy committed Feb 4, 2021
2 parents e1c7518 + de0515b commit 12f57c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/ESPAsync_WiFiManager-Impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ void ESPAsync_WiFiManager::scan()

//////////////////////////////////////////

void ESPAsync_WiFiManager::startConfigPortalModeless(char const *apName, char const *apPassword)
void ESPAsync_WiFiManager::startConfigPortalModeless(char const *apName, char const *apPassword, bool shouldConnectWiFi = true)
{
_modeless = true;
_apName = apName;
Expand All @@ -633,7 +633,7 @@ void ESPAsync_WiFiManager::startConfigPortalModeless(char const *apName, char co
LOGDEBUG("SET AP STA");

// try to connect
if (connectWifi("", "") == WL_CONNECTED)
if (shouldConnectWiFi && connectWifi("", "") == WL_CONNECTED)
{
LOGDEBUG1(F("IP Address:"), WiFi.localIP());

Expand Down
4 changes: 2 additions & 2 deletions src_h/ESPAsync_WiFiManager-Impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ void ESPAsync_WiFiManager::scan()

//////////////////////////////////////////

void ESPAsync_WiFiManager::startConfigPortalModeless(char const *apName, char const *apPassword)
void ESPAsync_WiFiManager::startConfigPortalModeless(char const *apName, char const *apPassword, bool shouldConnectWiFi = true)
{
_modeless = true;
_apName = apName;
Expand All @@ -633,7 +633,7 @@ void ESPAsync_WiFiManager::startConfigPortalModeless(char const *apName, char co
LOGDEBUG("SET AP STA");

// try to connect
if (connectWifi("", "") == WL_CONNECTED)
if (shouldConnectWiFi && connectWifi("", "") == WL_CONNECTED)
{
LOGDEBUG1(F("IP Address:"), WiFi.localIP());

Expand Down

0 comments on commit 12f57c9

Please sign in to comment.