Skip to content

Commit

Permalink
Merge pull request #84 from free-x/issue-83
Browse files Browse the repository at this point in the history
Issue #83: Converting MTW from PGN 130311
  • Loading branch information
wellenvogel authored Oct 11, 2024
2 parents db3d832 + 465c66a commit 33b5212
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/nmea2kto0183/N2kDataToNMEA0183.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1332,6 +1332,21 @@ class N2kToNMEA0183Functions : public N2kDataToNMEA0183
return;
}
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);
if (updateDouble(&mapping,Temperature)){
LOG_DEBUG(GwLog::DEBUG+1,"found temperature mapping %s",mapping.definition->toString().c_str());
Expand Down

0 comments on commit 33b5212

Please sign in to comment.