leamas
leamas
Not an endless loop, wp_len will always terminate it. But risk for an oversized message anyway. Should probably at least be logged.
Could be optimized somewhat, but I doubt it is necessary.
Somewhat faster and easier to read: ``` // RMB { SENTENCE snt; m_NMEA0183.TalkerID = "EC"; m_NMEA0183.Rmb.IsDataValid = bGPSValid ? NTrue : NFalse; m_NMEA0183.Rmb.FAAModeIndicator = bGPSValid ? "A" : "N"; m_NMEA0183.Rmb.RangeToDestinationNauticalMiles...
Please don't take my untested code for granted. I discovered a bug, now fixed, but there could certainly be more. The overall design is however ok IMHO
hm... I see this: ``` if (pActivePoint->m_lat < 0.) m_NMEA0183.Rmb.DestinationPosition.Latitude.Set( pActivePoint->m_lat, _T("S")); else m_NMEA0183.Rmb.DestinationPosition.Latitude.Set( pActivePoint->m_lat, _T("N")); if (pActivePoint->m_lon < 0.) m_NMEA0183.Rmb.DestinationPosition.Longitude.Set( pActivePoint->m_lon, _T("W")); else m_NMEA0183.Rmb.DestinationPosition.Longitude.Set( pActivePoint->m_lon, _T("E")); ``` First of...
Either it was already buggy, or you missed something when copying. Compare to for example around line 533: ``` if (gLat < 0.) m_NMEA0183.Rmc.Position.Latitude.Set(-gLat, _T("S")); else m_NMEA0183.Rmc.Position.Latitude.Set(gLat, _T("N")); if (gLon...
hrmpf... 13 lines instead of four to do the same thing ;) But this is just a matter of style, I guess. Don't worry about the error. This is the...
Thanks for the finding and the PR!
Windows? EDIT: Sorry, missed bottom comment