Move configuration to json

This commit is contained in:
2025-02-09 22:45:45 +11:00
parent 41af7b508f
commit b50edfa4aa
6 changed files with 74 additions and 116 deletions

View File

@@ -12,19 +12,15 @@ class Configurator
{
private:
std::vector<std::function<void (Shade)>> shadeConfiguredCallbacks;
std::map<std::string, uint16_t> discoveredIds;
std::map<std::string, std::string> discoveredFriendlyNames;
std::string extractKey(std::string topic);
bool tryBuild(std::string topic);
uint16_t parseRadioId(const char* rawRadioId);
public:
Configurator();
void addShadeConfiguredCallback(std::function<void (Shade)> callback);
void processIdMessage(std::string topic, std::string id);
void processFriendlyNameMessage(std::string topic, std::string friendlyName);
void processJson(std::string json);
};
#endif // CONFIGURATOR_H