Fix MAC address formating
This commit is contained in:
parent
1c6d4eaaba
commit
9c25cb47cd
@ -55,7 +55,8 @@ void netman::init(String ssid, String pass, bool hidden) {
|
|||||||
|
|
||||||
// Get the last 4 characters of the MAC address
|
// Get the last 4 characters of the MAC address
|
||||||
String macAddress = WiFi.macAddress();
|
String macAddress = WiFi.macAddress();
|
||||||
String macSuffix = macAddress.substring(macAddress.length() - 5).replace(":", "");
|
String macSuffix = macAddress.substring(macAddress.length() - 5);
|
||||||
|
macSuffix.replace(":", "");
|
||||||
|
|
||||||
// Set default SSID if none provided
|
// Set default SSID if none provided
|
||||||
_ssid = ssid.isEmpty() ? "SmartCube_" + macSuffix : ssid;
|
_ssid = ssid.isEmpty() ? "SmartCube_" + macSuffix : ssid;
|
||||||
|
Loading…
Reference in New Issue
Block a user