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

add support for pgn 127257

This commit is contained in:
andreas
2022-04-03 16:16:46 +02:00
parent 16a2ea32cb
commit 7d653c41ce
6 changed files with 44 additions and 4 deletions

View File

@@ -53,6 +53,7 @@ GwXDRType *types[] = {
new GwXDRType(GwXDRType::FLOW, "R", "I", ps2ph, ph2ps),
new GwXDRType(GwXDRType::GENERIC, "G", ""),
new GwXDRType(GwXDRType::DISPLACEMENT, "A", "P"),
new GwXDRType(GwXDRType::DISPLACEMENTD, "A", "D",DegToRad,RadToDeg),
new GwXDRType(GwXDRType::RPM,"T","R"),
//important to have 2x NULL!
NULL,
@@ -121,7 +122,7 @@ bool GwXDRMappingDef::handleToken(String tok, int index, GwXDRMappingDef *def)
case 0:
//category
i = tok.toInt();
if (i < XDRTEMP || i > XDRENGINE)
if (i < XDRTEMP || i > XDRATTITUDE)
return false;
def->category = (GwXDRCategory)i;
return true;

View File

@@ -19,7 +19,8 @@ typedef enum {
XDRBATCHEM=7, //unused
XDRGEAR=8, //unused
XDRBAT=9,
XDRENGINE=10
XDRENGINE=10,
XDRATTITUDE=11
} GwXDRCategory;
class GwXDRType{
public:
@@ -36,6 +37,7 @@ class GwXDRType{
GENERIC=9,
DISPLACEMENT=10,
RPM=11,
DISPLACEMENTD=12,
UNKNOWN=99
}TypeCode;
typedef double (* convert)(double);