From 019835fed74a701d75ce0373a9ca4ce870403df4 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Wed, 3 Jun 2020 12:50:03 +0100 Subject: [PATCH] Add the missing gps_read. --- NXDNGateway/APRSWriter.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NXDNGateway/APRSWriter.cpp b/NXDNGateway/APRSWriter.cpp index 9a16c5c..43518d5 100644 --- a/NXDNGateway/APRSWriter.cpp +++ b/NXDNGateway/APRSWriter.cpp @@ -221,6 +221,9 @@ void CAPRSWriter::sendIdFrameMobile() if (!::gps_waiting(&m_gpsdData, 0)) return; + if (::gps_read(&m_gpsdData, NULL, 0) <= 0) + return; + bool latlonSet = (m_gpsdData.set & LATLON_SET) == LATLON_SET; bool altitudeSet = (m_gpsdData.set & ALTITUDE_SET) == ALTITUDE_SET; bool velocitySet = (m_gpsdData.set & SPEED_SET) == SPEED_SET;