Ensure WiFi.localIP() is converted to a string when needed. (#455)

Due to a potential compiler issue (e.g. Platformio vs. Arduino IDE) it
seems that WiFi.localIP() wasn't being automatically associated with the
string varient when used in a string context.
Forcing the conversion should fix it in all cases.

Fixes #452

Checked by @DiggiD
This commit is contained in:
David Conran
2018-05-11 14:17:04 +10:00
committed by GitHub
parent 775810fb74
commit 3c11f651af
3 changed files with 3 additions and 3 deletions

View File

@@ -111,7 +111,7 @@ void setup() {
server.begin();
IPAddress myAddress = WiFi.localIP();
Serial.println(myAddress);
Serial.println(myAddress.toString());
irsend.begin();
}

View File

@@ -804,7 +804,7 @@ void setup_wifi() {
delay(5000);
}
debug("WiFi connected. IP address: " + WiFi.localIP());
debug("WiFi connected. IP address: " + WiFi.localIP().toString());
}
void setup(void) {

View File

@@ -102,7 +102,7 @@ void setup(void) {
Serial.print("Connected to ");
Serial.println(ssid);
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
Serial.println(WiFi.localIP().toString());
if (mdns.begin("esp8266", WiFi.localIP())) {
Serial.println("MDNS responder started");