mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-16 07:23:07 +01:00
allow to hide config items from the ui and allow to change config values in the init function
This commit is contained in:
@@ -14,11 +14,13 @@ class GwConfigHandler: public GwConfigDefinitions{
|
||||
GwLog *logger;
|
||||
typedef std::map<String,String> StringMap;
|
||||
StringMap changedValues;
|
||||
boolean allowChanges=true;
|
||||
public:
|
||||
public:
|
||||
GwConfigHandler(GwLog *logger);
|
||||
bool loadConfig();
|
||||
bool saveConfig();
|
||||
void stopChanges();
|
||||
bool updateValue(String name, String value);
|
||||
bool reset(bool save);
|
||||
String toString() const;
|
||||
@@ -27,6 +29,12 @@ class GwConfigHandler: public GwConfigDefinitions{
|
||||
bool getBool(const String name,bool defaultv=false) const ;
|
||||
int getInt(const String name,int defaultv=0) const;
|
||||
GwConfigInterface * getConfigItem(const String name, bool dummy=false) const;
|
||||
/**
|
||||
* change the value of a config item
|
||||
* will become a noop after stopChanges has been called
|
||||
* !use with care! no checks of the value
|
||||
*/
|
||||
bool setValue(String name, String value);
|
||||
private:
|
||||
};
|
||||
#endif
|
||||
Reference in New Issue
Block a user