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:
John Stäck 2014-08-16 21:58:55 +02:00
parent 9e1ad597a4
commit 6a80aaa7f3

View file

@ -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)
{