Actually use the MAC address from a ch341 (#5704)

Co-authored-by: Tom Fifield <tom@tomfifield.net>
pull/5710/head
Jonathan Bennett 2024-12-31 00:46:03 -06:00 zatwierdzone przez GitHub
rodzic d1e5be515a
commit 58ebd5bcdb
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -18,6 +18,7 @@
#include <fstream>
#include <iostream>
#include <map>
#include <sstream>
#include <sys/ioctl.h>
#include <unistd.h>
@ -231,6 +232,9 @@ void portduinoSetup()
dmac[3] = hash[3];
dmac[4] = hash[4];
dmac[5] = hash[5];
std::stringstream mactmp;
mactmp << std::hex << +dmac[0] << +dmac[1] << +dmac[2] << +dmac[3] << +dmac[4] << +dmac[5];
settingsStrings[mac_address] = mactmp.str();
}
}