Skip to content

Commit

Permalink
Ensure WiFi.localIP() is converted to a string when needed. (#455)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
crankyoldgit authored May 11, 2018
1 parent 775810f commit 3c11f65
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/IRGCTCPServer/IRGCTCPServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ void setup() {

server.begin();
IPAddress myAddress = WiFi.localIP();
Serial.println(myAddress);
Serial.println(myAddress.toString());
irsend.begin();
}

Expand Down
2 changes: 1 addition & 1 deletion examples/IRMQTTServer/IRMQTTServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion examples/IRServer/IRServer.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 3c11f65

Please sign in to comment.