mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-24 13:21:23 +01:00
give up eventually
This commit is contained in:
parent
837b0a9fb6
commit
77ee57eb83
@ -77,6 +77,7 @@ bool WifiESP::setup(const char *SSid,
|
||||
bool havePassword = true;
|
||||
bool haveSSID = true;
|
||||
bool wifiUp = false;
|
||||
uint8_t tries = 40;
|
||||
|
||||
// tests
|
||||
// enableCoreWDT(1);
|
||||
@ -92,8 +93,9 @@ bool WifiESP::setup(const char *SSid,
|
||||
WiFi.mode(WIFI_STA);
|
||||
WiFi.setAutoReconnect(true);
|
||||
WiFi.begin(SSid, password);
|
||||
while (WiFi.status() != WL_CONNECTED) {
|
||||
while (WiFi.status() != WL_CONNECTED && tries) {
|
||||
Serial.print('.');
|
||||
tries--;
|
||||
delay(500);
|
||||
}
|
||||
if (WiFi.status() == WL_CONNECTED) {
|
||||
|
Loading…
Reference in New Issue
Block a user