mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-30 03:26:13 +01:00
convert mac addr hex chars to lower case to be compatible with AT software
This commit is contained in:
parent
ec6e730559
commit
f3cb263aaa
|
@ -106,6 +106,12 @@ void wifiLoop(void *){
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
char asciitolower(char in) {
|
||||||
|
if (in <= 'Z' && in >= 'A')
|
||||||
|
return in - ('Z' - 'z');
|
||||||
|
return in;
|
||||||
|
}
|
||||||
|
|
||||||
bool WifiESP::setup(const char *SSid,
|
bool WifiESP::setup(const char *SSid,
|
||||||
const char *password,
|
const char *password,
|
||||||
const char *hostname,
|
const char *hostname,
|
||||||
|
@ -183,6 +189,8 @@ bool WifiESP::setup(const char *SSid,
|
||||||
strMac.remove(0,9);
|
strMac.remove(0,9);
|
||||||
strMac.replace(":","");
|
strMac.replace(":","");
|
||||||
strMac.replace(":","");
|
strMac.replace(":","");
|
||||||
|
// convert mac addr hex chars to lower case to be compatible with AT software
|
||||||
|
std::transform(strMac.begin(), strMac.end(), strMac.begin(), asciitolower);
|
||||||
strSSID.concat(strMac);
|
strSSID.concat(strMac);
|
||||||
strPass.concat(strMac);
|
strPass.concat(strMac);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user