[SYS] Reduce default WiFi timeout when changing it (#1789)
To avoid the WDT to trigger before the end of the connect result
This commit is contained in:
1 parent
ca51136d26
commit
ca9ef664ab
2 files changed
+4
-4
No files matched your search
+2
-2
@@ -127,8 +127,8 @@ const byte mac[] = {0xDE, 0xED, 0xBA, 0xFE, 0x54, 0x95}; //W5100 ethernet shield
|
|||||||
#ifndef WifiManager_ConfigPortalTimeOut
|
#ifndef WifiManager_ConfigPortalTimeOut
|
||||||
# define WifiManager_ConfigPortalTimeOut 240 //time in seconds for the setup portal to stay open, default 240s
|
# define WifiManager_ConfigPortalTimeOut 240 //time in seconds for the setup portal to stay open, default 240s
|
||||||
#endif
|
#endif
|
||||||
#ifndef WifiManager_TimeOut
|
#ifndef WiFi_TimeOut
|
||||||
# define WifiManager_TimeOut 5
|
# define WiFi_TimeOut 5
|
||||||
#endif
|
#endif
|
||||||
#ifndef WM_DEBUG_LEVEL
|
#ifndef WM_DEBUG_LEVEL
|
||||||
# define WM_DEBUG_LEVEL 1 // valid values are: DEBUG_ERROR = 0, DEBUG_NOTIFY = 1, DEBUG_VERBOSE = 2, DEBUG_DEV = 3, DEBUG_MAX = 4
|
# define WM_DEBUG_LEVEL 1 // valid values are: DEBUG_ERROR = 0, DEBUG_NOTIFY = 1, DEBUG_VERBOSE = 2, DEBUG_DEV = 3, DEBUG_MAX = 4
|
||||||
|
|||||||
+2
-2
@@ -1606,7 +1606,7 @@ void setup_wifimanager(bool reset_settings) {
|
|||||||
//WiFiManager
|
//WiFiManager
|
||||||
//Local intialization. Once its business is done, there is no need to keep it around
|
//Local intialization. Once its business is done, there is no need to keep it around
|
||||||
|
|
||||||
wifiManager.setConnectTimeout(WifiManager_TimeOut);
|
wifiManager.setConnectTimeout(WiFi_TimeOut);
|
||||||
//Set timeout before going to portal
|
//Set timeout before going to portal
|
||||||
wifiManager.setConfigPortalTimeout(WifiManager_ConfigPortalTimeOut);
|
wifiManager.setConfigPortalTimeout(WifiManager_ConfigPortalTimeOut);
|
||||||
|
|
||||||
@@ -2691,7 +2691,7 @@ void MQTTtoSYS(char* topicOri, JsonObject& SYSdata) { // json object decoding
|
|||||||
# if (defined(ESP8266) || defined(ESP32)) && (defined(WifiGMode) || defined(WifiPower))
|
# if (defined(ESP8266) || defined(ESP32)) && (defined(WifiGMode) || defined(WifiPower))
|
||||||
setESPWifiProtocolTxPower();
|
setESPWifiProtocolTxPower();
|
||||||
# endif
|
# endif
|
||||||
WiFi.waitForConnectResult();
|
WiFi.waitForConnectResult(WiFi_TimeOut * 1000);
|
||||||
|
|
||||||
if (WiFi.status() != WL_CONNECTED) {
|
if (WiFi.status() != WL_CONNECTED) {
|
||||||
Log.error(F("Failed to connect to new AP; falling back" CR));
|
Log.error(F("Failed to connect to new AP; falling back" CR));
|
||||||
|
|||||||
Reference in new issue
Block a user