1
0
mirror of https://github.com/thooge/esp32-nmea2000-obp60.git synced 2025-12-13 05:53:06 +01:00

dynamic adding of xdr boat data for implemented n2k conversions

This commit is contained in:
wellenvogel
2021-11-24 18:52:33 +01:00
parent 166d8d826b
commit fb13a70ce6
7 changed files with 54 additions and 13 deletions

View File

@@ -188,6 +188,10 @@ GwXDRMappingDef *GwXDRMappingDef::fromString(String s)
return NULL;
}
}
if (rt->direction == GwXDRMappingDef::M_DISABLED || rt->xdrName == ""){
delete rt;
return NULL;
}
return rt;
}
String GwXDRMappingDef::getTransducerName(int instance)

View File

@@ -166,7 +166,7 @@ class GwXDRFoundMapping : public GwBoatItemNameProvider{
String buildXdrEntry(double value);
//boat Data info
virtual String getBoatItemName(){
return getTransducerName();
return String("xdr")+getTransducerName();
};
virtual String getBoatItemFormat(){
return "formatXdr"+type->xdrunit; //TODO: use the type def for the correct format