mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-15 23:13:07 +01:00
correct factory reset handling after optimization
This commit is contained in:
@@ -12,21 +12,16 @@ class GwConfigInterface{
|
||||
bool secret=false;
|
||||
String changedValue;
|
||||
bool hasChangedValue=false;
|
||||
void updateValue(String value,bool cmpDefault=false){
|
||||
hasChangedValue=false;
|
||||
if (cmpDefault){
|
||||
if (value != initialValue) {
|
||||
changedValue=value;
|
||||
hasChangedValue=true;
|
||||
}
|
||||
void updateValue(String value)
|
||||
{
|
||||
hasChangedValue = false;
|
||||
if (value != this->value)
|
||||
{
|
||||
changedValue = value;
|
||||
hasChangedValue = true;
|
||||
}
|
||||
else{
|
||||
if (value != this->value) {
|
||||
changedValue=value;
|
||||
hasChangedValue=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
GwConfigInterface(const String &name, const char * initialValue, bool secret=false){
|
||||
this->name=name;
|
||||
|
||||
Reference in New Issue
Block a user