From 97a743af0accc90504078abc0a1ae81b9e822dfc Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Sat, 15 Jul 2023 08:58:54 +0200 Subject: [PATCH] undo gpsd move to other branch --- Common/APRSGPSDIdFrameProvider.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Common/APRSGPSDIdFrameProvider.cpp b/Common/APRSGPSDIdFrameProvider.cpp index 8b99a7a..7a2a0e5 100644 --- a/Common/APRSGPSDIdFrameProvider.cpp +++ b/Common/APRSGPSDIdFrameProvider.cpp @@ -79,16 +79,14 @@ bool CAPRSGPSDIdFrameProvider::buildAPRSFramesInt(const CAPRSEntry * entry, std: return false; #else -#ifndef STATUS_UNK -#define STATUS_UNK STATUS_NO_FIX //Dirty ack. because gpsd history doc just s*cks -#endif - - if (m_gpsdData.fix.status == STATUS_UNK) +#if GPSD_API_MAJOR_VERSION >= 10 + if(m_gpsdData.fix.status == STATUS_NO_FIX) + return false; +#else + if (m_gpsdData.status != STATUS_FIX) return false; - #endif - 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;