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

correct backward xdr mapping for unknown instance, prefer instance mode single for unmapped, improve traces

This commit is contained in:
wellenvogel
2021-12-03 22:51:31 +01:00
parent 236c417fb5
commit 84483024ac
4 changed files with 47 additions and 37 deletions

View File

@@ -216,7 +216,10 @@ private:
if (found.empty) continue;
value=found.valueFromXdr(value);
if (!boatData->update(value,msg.sourceId,&found)) continue;
LOG_DEBUG(GwLog::DEBUG,"found mapped XDR %s, value %f",transducerName,value);
LOG_DEBUG(GwLog::DEBUG,"found mapped XDR %s:%s, value %f",
transducerName.c_str(),
found.definition->toString().c_str(),
value);
foundMappings.push_back(XdrMappingAndValue(found,value));
}
static const int maxFields=20;
@@ -291,7 +294,7 @@ private:
}
}
else{
if (fillFieldList(current, fields, 12,13)){
if (fillFieldList(current, fields, 10,13)){
SetN2kPGN127488(n2kMsg,current.mapping.instanceId,
fields[10],fields[11],fields[12]);
send(n2kMsg, buildN2KKey(n2kMsg, current.mapping));