fix setting the hostname
This commit is contained in:
parent
af85295bb2
commit
d9b5b0093e
@ -16,10 +16,9 @@ namespace Wifi {
|
|||||||
tWifiConnected.restart();
|
tWifiConnected.restart();
|
||||||
});
|
});
|
||||||
|
|
||||||
WiFi.hostname("esp-clock");
|
|
||||||
|
|
||||||
ESP8266WiFiMulti wifiMulti;
|
ESP8266WiFiMulti wifiMulti;
|
||||||
for (int i = 0; i < sizeof(credentials)/sizeof(WifiCredentials); i++) {
|
for (uint32_t i = 0; i < sizeof(credentials) / sizeof(WifiCredentials); i++) {
|
||||||
wifiMulti.addAP(credentials[i].ssid, credentials[i].password);
|
wifiMulti.addAP(credentials[i].ssid, credentials[i].password);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,6 +26,7 @@ namespace Wifi {
|
|||||||
while (wifiMulti.run() != WL_CONNECTED) {
|
while (wifiMulti.run() != WL_CONNECTED) {
|
||||||
delay(500);
|
delay(500);
|
||||||
}
|
}
|
||||||
|
WiFi.setHostname("esp-clock");
|
||||||
currentSSID = WiFi.SSID();
|
currentSSID = WiFi.SSID();
|
||||||
currentPsk = WiFi.psk();
|
currentPsk = WiFi.psk();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,5 +28,5 @@ build_flags = -D IR=1 -D WIFI_ALWAYS_ON=1
|
|||||||
[env:laptop_home]
|
[env:laptop_home]
|
||||||
|
|
||||||
[env:ota_home]
|
[env:ota_home]
|
||||||
upload_port = 192.168.5.191
|
upload_port = esp-clock
|
||||||
upload_protocol = espota
|
upload_protocol = espota
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user