mirror of
https://github.com/thooge/esp32-nmea2000-obp60.git
synced 2025-12-16 07:23:07 +01:00
correctly map pressure from bar to pascal in xdr
This commit is contained in:
@@ -44,14 +44,24 @@ class GwXDRType{
|
||||
TypeCode code;
|
||||
String xdrtype;
|
||||
String xdrunit;
|
||||
String boatDataUnit;
|
||||
convert tonmea=NULL;
|
||||
convert fromnmea=NULL;
|
||||
GwXDRType(TypeCode tc,String xdrtype,String xdrunit,convert fromnmea=NULL,convert tonmea=NULL){
|
||||
GwXDRType(TypeCode tc,String xdrtype,String xdrunit){
|
||||
this->code=tc;
|
||||
this->xdrtype=xdrtype;
|
||||
this->xdrunit=xdrunit;
|
||||
this->boatDataUnit=xdrunit;
|
||||
this->fromnmea=fromnmea;
|
||||
this->tonmea=tonmea;
|
||||
}
|
||||
GwXDRType(TypeCode tc,String xdrtype,String xdrunit,convert fromnmea,convert tonmea,String boatDataUnit=String()){
|
||||
this->code=tc;
|
||||
this->xdrtype=xdrtype;
|
||||
this->xdrunit=xdrunit;
|
||||
this->fromnmea=fromnmea;
|
||||
this->tonmea=tonmea;
|
||||
this->boatDataUnit=boatDataUnit.isEmpty()?xdrunit:boatDataUnit;
|
||||
}
|
||||
};
|
||||
class GwXDRTypeMapping{
|
||||
@@ -183,7 +193,7 @@ class GwXDRFoundMapping : public GwBoatItemNameProvider{
|
||||
return String("xdr")+getTransducerName();
|
||||
};
|
||||
virtual String getBoatItemFormat(){
|
||||
return "formatXdr:"+type->xdrtype+":"+type->xdrunit;
|
||||
return "formatXdr:"+type->xdrtype+":"+type->boatDataUnit;
|
||||
};
|
||||
virtual ~GwXDRFoundMapping(){}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user