mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-21 18:22:32 +00:00
Portduino: fix setting hwId via argument (#5565)
This commit is contained in:
@@ -87,7 +87,8 @@ void getMacAddr(uint8_t *dmac)
|
|||||||
if (strlen(optionMac) >= 12) {
|
if (strlen(optionMac) >= 12) {
|
||||||
MAC_from_string(optionMac, dmac);
|
MAC_from_string(optionMac, dmac);
|
||||||
} else {
|
} else {
|
||||||
uint32_t hwId = sscanf(optionMac, "%u", &hwId);
|
uint32_t hwId;
|
||||||
|
sscanf(optionMac, "%u", &hwId);
|
||||||
dmac[0] = 0x80;
|
dmac[0] = 0x80;
|
||||||
dmac[1] = 0;
|
dmac[1] = 0;
|
||||||
dmac[2] = hwId >> 24;
|
dmac[2] = hwId >> 24;
|
||||||
|
|||||||
Reference in New Issue
Block a user