Host metrics (#6817)

* Add std::string exec() function to PortduinoGlue for future work

* MVP for HostMetrics module.

* Fix compilation for other targets

* Remove extra debug calls

* Big numbers don't do well as INTs.

* Add HostMetrics to config.yaml
This commit is contained in:
Jonathan Bennett
2025-05-15 09:23:37 -05:00
committed by GitHub
parent 7d8f9c7f6d
commit 1ef4caea05
6 changed files with 205 additions and 2 deletions

View File

@@ -100,7 +100,9 @@ enum configNames {
ascii_logs,
config_directory,
available_directory,
mac_address
mac_address,
hostMetrics_interval,
hostMetrics_channel
};
enum { no_screen, x11, fb, st7789, st7735, st7735s, st7796, ili9341, ili9342, ili9486, ili9488, hx8357d };
enum { no_touchscreen, xpt2046, stmpe610, gt911, ft5x06 };
@@ -114,4 +116,5 @@ int initGPIOPin(int pinNum, std::string gpioChipname, int line);
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);
bool MAC_from_string(std::string mac_str, uint8_t *dmac);
std::string exec(const char *cmd);