Change MAC address input format
Set the base of strtol to 16 when parsing MAC address. This means the address can be specified in the much more human-friendly format M540 PBE:EF:12:34:56:78 The variant with "0x" preceding each byte still works just as earlier, this small change just makes the 0x optional.
This commit is contained in:
parent
9e1ad597a4
commit
6a80aaa7f3
1 changed files with 1 additions and 1 deletions
|
@ -1344,7 +1344,7 @@ void GCodes::SetMACAddress(GCodeBuffer *gb)
|
|||
{
|
||||
if(ipString[sp] == ':')
|
||||
{
|
||||
mac[ipp] = strtol(&ipString[spp], NULL, 0);
|
||||
mac[ipp] = strtol(&ipString[spp], NULL, 16);
|
||||
ipp++;
|
||||
if(ipp > 5)
|
||||
{
|
||||
|
|
Reference in a new issue