feature/InfluxDB-Connection-Update #1
1 changed files with 3 additions and 0 deletions
|
@ -68,9 +68,11 @@ void setup()
|
||||||
wifiManager.setTimeout(WIFI_CONFIG_PORTAL_TIMEOUT_S);
|
wifiManager.setTimeout(WIFI_CONFIG_PORTAL_TIMEOUT_S);
|
||||||
|
|
||||||
#ifndef SLEEP_IF_NO_WLAN_CONNECTION
|
#ifndef SLEEP_IF_NO_WLAN_CONNECTION
|
||||||
|
// do not sleep, repeat connecting
|
||||||
while
|
while
|
||||||
#endif
|
#endif
|
||||||
#ifdef def SLEEP_IF_NO_WLAN_CONNECTION
|
#ifdef def SLEEP_IF_NO_WLAN_CONNECTION
|
||||||
|
// stop connecting after fail to connect to wifi
|
||||||
if
|
if
|
||||||
#endif
|
#endif
|
||||||
(!wifiManager.autoConnect(wifiName.c_str(), "DEADBEEF"))
|
(!wifiManager.autoConnect(wifiName.c_str(), "DEADBEEF"))
|
||||||
|
@ -82,6 +84,7 @@ void setup()
|
||||||
delay(100);
|
delay(100);
|
||||||
#endif
|
#endif
|
||||||
#ifndef SLEEP_IF_NO_WLAN_CONNECTION
|
#ifndef SLEEP_IF_NO_WLAN_CONNECTION
|
||||||
|
// sleep a few seconds and go on trying to connect
|
||||||
delay(5000);
|
delay(5000);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue