Add MACAddress to config.yaml (#5506)

* Add MACAddress to config.yaml

* Better error handling on native, including failing to launch with blank MAC Address and real hardware.

* Re-arrange Mac Address handling and add MACAddressSource

* Bump portduino to remove macaddr function there

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
Jonathan Bennett
2024-12-07 10:29:49 -06:00
committed by GitHub
parent b99e57a6fa
commit 4a34bf648f
4 changed files with 124 additions and 13 deletions

View File

@@ -59,7 +59,8 @@ enum configNames {
maxtophone,
maxnodes,
ascii_logs,
config_directory
config_directory,
mac_address
};
enum { no_screen, x11, st7789, st7735, st7735s, st7796, ili9341, ili9342, ili9488, hx8357d };
enum { no_touchscreen, xpt2046, stmpe610, gt911, ft5x06 };
@@ -71,3 +72,5 @@ extern std::ofstream traceFile;
int initGPIOPin(int pinNum, std::string gpioChipname);
bool loadConfig(const char *configPath);
static bool ends_with(std::string_view str, std::string_view suffix);
void getMacAddr(uint8_t *dmac);
bool MAC_from_string(std::string mac_str, uint8_t *dmac);