1
0
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:
wellenvogel
2022-01-14 23:16:43 +01:00
parent e70591eb4f
commit 966ef0c4fb
6 changed files with 49 additions and 10 deletions

View File

@@ -114,6 +114,16 @@ int GwConfigHandler::getInt(const String name,int defaultv) const{
if (!i) return defaultv;
return i->asInt();
}
void GwConfigHandler::stopChanges(){
allowChanges=false;
}
bool GwConfigHandler::setValue(String name,String value){
if (! allowChanges) return false;
GwConfigInterface *i=getConfigItem(name,false);
if (!i) return false;
i->value=value;
return true;
}
void GwNmeaFilter::handleToken(String token, int index){
switch(index){