1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2026-02-11 07:03:07 +01:00

avoid creating unmapped XDR entries for unset N2K values

This commit is contained in:
wellenvogel
2025-09-29 17:53:14 +02:00
parent c21592599f
commit 32862b9e29
4 changed files with 28 additions and 26 deletions

View File

@@ -431,7 +431,8 @@ GwXDRFoundMapping GwXDRMappings::getMapping(String xName,String xType,String xUn
}
return selectMapping(&(it->second),instance,n183Key.c_str());
}
GwXDRFoundMapping GwXDRMappings::getMapping(GwXDRCategory category,int selector,int field,int instance){
GwXDRFoundMapping GwXDRMappings::getMapping(double value,GwXDRCategory category,int selector,int field,int instance){
if (value == N2kDoubleNA) return GwXDRFoundMapping(); //do not add to unknown mappings
unsigned long n2kKey=GwXDRMappingDef::n2kKey(category,selector,field);
auto it=n2kMap.find(n2kKey);
if (it == n2kMap.end()){