Merge pull request #84 from free-x/issue-83

Issue #83: Converting MTW from PGN 130311
This commit is contained in:
Andreas Vogel 2024-10-11 15:42:48 +02:00 committed by GitHub
commit 33b5212e0a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 15 additions and 0 deletions

View File

@ -1332,6 +1332,21 @@ private:
return; return;
} }
int i=0; int i=0;
if (TempSource == N2kts_SeaTemperature) {
updateDouble(boatData->WTemp, Temperature);
tNMEA0183Msg NMEA0183Msg;
if (!NMEA0183Msg.Init("MTW", talkerId))
return;
if (!NMEA0183Msg.AddDoubleField(KelvinToC(Temperature)))
return;
if (!NMEA0183Msg.AddStrField("C"))
return;
SendMessage(NMEA0183Msg);
i++;
}
GwXDRFoundMapping mapping=xdrMappings->getMapping(XDRTEMP,TempSource,0,0); GwXDRFoundMapping mapping=xdrMappings->getMapping(XDRTEMP,TempSource,0,0);
if (updateDouble(&mapping,Temperature)){ if (updateDouble(&mapping,Temperature)){
LOG_DEBUG(GwLog::DEBUG+1,"found temperature mapping %s",mapping.definition->toString().c_str()); LOG_DEBUG(GwLog::DEBUG+1,"found temperature mapping %s",mapping.definition->toString().c_str());