You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
void tN2kDataToNMEA0183::HandleMsg(const tN2kMsg &N2kMsg) {
switch (N2kMsg.PGN) {
case 127250UL: HandleHeading(N2kMsg);
case 127258UL: HandleVariation(N2kMsg);
case 128259UL: HandleBoatSpeed(N2kMsg);
case 128267UL: HandleDepth(N2kMsg);
case 129025UL: HandlePosition(N2kMsg);
case 129026UL: HandleCOGSOG(N2kMsg);
case 129029UL: HandleGNSS(N2kMsg);
}
}
I was adding case 129038UL: HandleAISClassAPosReport(N2kMsg); // AIS Class A Position Report
and got many false returns, because every PGN from all cases were sent to on ParseN2kPGN129038 function.
I added break; to each case line and now it works.
The text was updated successfully, but these errors were encountered:
Hi Timo,
in example NMEA0183/Examples/NMEA2000ToNMEA0183/
there is:
I was adding
case 129038UL: HandleAISClassAPosReport(N2kMsg); // AIS Class A Position Report
and got many false returns, because every PGN from all cases were sent to on
ParseN2kPGN129038
function.I added
break;
to eachcase
line and now it works.The text was updated successfully, but these errors were encountered: