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

add XDR min interval, N2K min interval, add N2K_LOAD_LEVEL and N2K_CERTIFICATION_LEVEL

This commit is contained in:
wellenvogel
2021-12-03 11:47:05 +01:00
parent b01dabf8cc
commit 3e73f6b80c
10 changed files with 116 additions and 36 deletions

View File

@@ -208,10 +208,11 @@ String GwXDRMappingDef::getTransducerName(int instance)
return name;
}
String GwXDRFoundMapping::buildXdrEntry(double value)
GwXDRFoundMapping::XdrEntry GwXDRFoundMapping::buildXdrEntry(double value)
{
char buffer[40];
String name = getTransducerName();
XdrEntry rt;
rt.transducer = getTransducerName();
if (type->tonmea)
{
value = (*(type->tonmea))(value);
@@ -220,9 +221,10 @@ String GwXDRFoundMapping::buildXdrEntry(double value)
type->xdrtype.c_str(),
value,
type->xdrunit.c_str(),
name.c_str());
rt.transducer.c_str());
buffer[39] = 0;
return String(buffer);
rt.entry=String(buffer);
return rt;
}
GwXDRMappings::GwXDRMappings(GwLog *logger, GwConfigHandler *config)
@@ -441,7 +443,7 @@ String GwXDRMappings::getXdrEntry(String mapping, double value,int instance){
found.instanceId=instance;
if (first) first=false;
else rt+=",";
rt+=found.buildXdrEntry(value);
rt+=found.buildXdrEntry(value).entry;
type = findType(code, &typeIndex);
}
delete def;