1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-14 22:43:07 +01:00

allow to set XDR mappings from user tasks

This commit is contained in:
andreas
2023-10-24 18:20:01 +02:00
parent 4b3c6f13b4
commit f0643b636a
8 changed files with 162 additions and 61 deletions

View File

@@ -319,6 +319,13 @@ public:
}
virtual ~ApiImpl(){}
virtual TaskInterfaces *taskInterfaces(){ return nullptr;}
virtual bool addXdrMapping(const GwXDRMappingDef &mapping){
if (! config.userChangesAllowed()){
logger.logDebug(GwLog::ERROR,"trying to add an XDR mapping %s after the init phase",mapping.toString().c_str());
return false;
}
return xdrMappings.addFixedMapping(mapping);
}
};
bool delayedRestart(){