1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-15 23:13:07 +01:00

allow to set default and hide for cfg values in hardware defs

This commit is contained in:
andreas
2023-10-05 16:57:05 +02:00
parent 27de94b1ae
commit 9572b1e95e
6 changed files with 58 additions and 4 deletions

View File

@@ -10,12 +10,14 @@ class GwConfigInterface{
const char * initialValue;
String value;
bool secret=false;
bool hidden=false;
public:
GwConfigInterface(const String &name, const char * initialValue, bool secret=false){
GwConfigInterface(const String &name, const char * initialValue, bool secret=false, bool hidden=false){
this->name=name;
this->initialValue=initialValue;
this->value=initialValue;
this->secret=secret;
this->hidden=hidden;
}
virtual String asString() const{
return value;
@@ -41,6 +43,9 @@ class GwConfigInterface{
String getDefault() const {
return initialValue;
}
bool isHidden() const {
return hidden;
}
friend class GwConfigHandler;
};