mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-27 01:56:14 +01:00
Update WiFi LCD messages
This commit is contained in:
parent
df20e3ad95
commit
6253267b5d
|
@ -181,7 +181,14 @@ bool WifiESP::setup(const char *SSid,
|
|||
if (WiFi.status() == WL_CONNECTED) {
|
||||
// DIAG(F("Wifi STA IP %s"),WiFi.localIP().toString().c_str());
|
||||
DIAG(F("Wifi in STA mode"));
|
||||
LCD(7, F("IP: %s"), WiFi.localIP().toString().c_str());
|
||||
//
|
||||
if (MAX_MSG_SIZE < 20) {
|
||||
LCD(4, F("IP: %s"), WiFi.localIP().toString().c_str());
|
||||
LCD(5,F("PORT=%d WiFi"), IP_PORT);
|
||||
} else {
|
||||
LCD(4, F("WiFi UP"));
|
||||
LCD(5, F("%s:%d"), WiFi.localIP().toString().c_str(), IP_PORT);
|
||||
}
|
||||
wifiUp = true;
|
||||
} else {
|
||||
DIAG(F("Could not connect to Wifi SSID %s"),SSid);
|
||||
|
@ -228,12 +235,12 @@ bool WifiESP::setup(const char *SSid,
|
|||
havePassword ? password : strPass.c_str(),
|
||||
channel, false, 8)) {
|
||||
// DIAG(F("Wifi AP SSID %s PASS %s"),strSSID.c_str(),havePassword ? password : strPass.c_str());
|
||||
DIAG(F("Wifi in AP mode"));
|
||||
LCD(5, F("Wifi: %s"), strSSID.c_str());
|
||||
DIAG(F("WiFi in AP mode"));
|
||||
LCD(4, F("WiFi: %s"), strSSID.c_str());
|
||||
LCD(5, F("%s:%d"),WiFi.softAPIP().toString().c_str(), IP_PORT);
|
||||
if (!havePassword)
|
||||
LCD(6, F("PASS: %s"),strPass.c_str());
|
||||
// DIAG(F("Wifi AP IP %s"),WiFi.softAPIP().toString().c_str());
|
||||
LCD(7, F("IP: %s"),WiFi.softAPIP().toString().c_str());
|
||||
wifiUp = true;
|
||||
APmode = true;
|
||||
} else {
|
||||
|
|
|
@ -166,10 +166,10 @@ wifiSerialState WifiInterface::setup(Stream & setupStream, const FSH* SSid, con
|
|||
if (wifiState == WIFI_CONNECTED) {
|
||||
StringFormatter::send(wifiStream, F("ATE0\r\n")); // turn off the echo
|
||||
checkForOK(200, true);
|
||||
DIAG(F("WiFi CONNECTED"));
|
||||
DIAG(F("WiFi UP"));
|
||||
// LCD already shows IP
|
||||
} else {
|
||||
LCD(4,F("WiFi DISCON."));
|
||||
LCD(4,F("WiFi DOWN"));
|
||||
}
|
||||
return wifiState;
|
||||
}
|
||||
|
@ -366,11 +366,15 @@ wifiSerialState WifiInterface::setup2(const FSH* SSid, const FSH* password,
|
|||
}
|
||||
ipString[ipLen]=ipChar;
|
||||
}
|
||||
if (MAX_MSG_SIZE < 20) {
|
||||
LCD(4,F("%s"),ipString); // There is not enough room on some LCDs to put a title to this
|
||||
LCD(5,F("PORT=%d WiFi"),port);
|
||||
} else {
|
||||
LCD(4,F("WiFi UP"));
|
||||
LCD(5,F("%s:%d"), ipString, port);
|
||||
}
|
||||
}
|
||||
// suck up anything after the IP.
|
||||
if (!checkForOK(1000, true, false)) return WIFI_DISCONNECTED;
|
||||
LCD(5,F("PORT=%d"),port);
|
||||
|
||||
return WIFI_CONNECTED;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user