Add unit tests
This commit is contained in:
parent
8d2edc40ca
commit
98c036f9e3
14 changed files with 263 additions and 126 deletions
|
@ -605,4 +605,15 @@ void WiFiEvent(WiFiEvent_t event, WiFiEventInfo_t info)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
String getMyHostname() {
|
||||
uint8_t mac[6];
|
||||
//WiFi.macAddress(mac);
|
||||
esp_efuse_mac_get_default(mac);
|
||||
char hostname[15];
|
||||
String hostnamePrefix = preferences.getString("hostnamePrefix", "btclock");
|
||||
snprintf(hostname, sizeof(hostname), "%s-%02x%02x%02x",
|
||||
hostnamePrefix, mac[3], mac[4], mac[5]);
|
||||
return hostname;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue