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

Commit fafe08e

Browse files
committed
tidied up ifs
1 parent 604ff59 commit fafe08e

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src_cpp/ESPAsync_WiFiManager.cpp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -633,18 +633,16 @@ void ESPAsync_WiFiManager::startConfigPortalModeless(char const *apName, char co
633633
LOGDEBUG("SET AP STA");
634634

635635
// try to connect
636-
if (shouldConnectWiFi) {
637-
if (connectWifi("", "") == WL_CONNECTED)
636+
if (shouldConnectWiFi && connectWifi("", "") == WL_CONNECTED)
637+
{
638+
LOGDEBUG1(F("IP Address:"), WiFi.localIP());
639+
640+
if ( _savecallback != NULL)
638641
{
639-
LOGDEBUG1(F("IP Address:"), WiFi.localIP());
640-
641-
if ( _savecallback != NULL)
642-
{
643-
//todo: check if any custom parameters actually exist, and check if they really changed maybe
644-
_savecallback();
645-
}
642+
//todo: check if any custom parameters actually exist, and check if they really changed maybe
643+
_savecallback();
646644
}
647-
}
645+
}
648646

649647
if ( _apcallback != NULL)
650648
{

0 commit comments

Comments
 (0)