Native config.d (#5165)

* Add support for loading yaml from a config directory

* Add waveshare hats to the new config.d approach

* Move to available.d for module inactive module configs
This commit is contained in:
Jonathan Bennett
2024-10-28 21:48:10 -05:00
committed by GitHub
parent e12fd27b49
commit 850f61d2d0
8 changed files with 239 additions and 189 deletions

View File

@@ -55,7 +55,8 @@ enum configNames {
webserverrootpath,
maxtophone,
maxnodes,
ascii_logs
ascii_logs,
config_directory
};
enum { no_screen, x11, st7789, st7735, st7735s, st7796, ili9341, ili9342, ili9488, hx8357d };
enum { no_touchscreen, xpt2046, stmpe610, gt911, ft5x06 };
@@ -64,4 +65,6 @@ enum { level_error, level_warn, level_info, level_debug, level_trace };
extern std::map<configNames, int> settingsMap;
extern std::map<configNames, std::string> settingsStrings;
extern std::ofstream traceFile;
int initGPIOPin(int pinNum, std::string gpioChipname);
int initGPIOPin(int pinNum, std::string gpioChipname);
bool loadConfig(const char *configPath);
static bool ends_with(std::string_view str, std::string_view suffix);