diff options
Diffstat (limited to 'upstream-pr-325.patch')
-rw-r--r-- | upstream-pr-325.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/upstream-pr-325.patch b/upstream-pr-325.patch new file mode 100644 index 000000000000..6d6f42622342 --- /dev/null +++ b/upstream-pr-325.patch @@ -0,0 +1,47 @@ +diff --git a/indi-gpsd/gps_driver.cpp b/indi-gpsd/gps_driver.cpp +index 66982e53..737ca0ac 100644 +--- a/indi-gpsd/gps_driver.cpp ++++ b/indi-gpsd/gps_driver.cpp +@@ -279,10 +279,14 @@ IPState GPSD::updateGPS() + break; + } + +-#if GPSD_API_MAJOR_VERSION >= 10 +- if (gpsData->fix.status == STATUS_NO_FIX) ++#if GPSD_API_MAJOR_VERSION >= 11 ++ // From gpsd v3.22 STATUS_NO_FIX may also mean unknown fix state, can ++ // only tell from the mode value ++ if (gpsData->fix.mode < MODE_2D) ++#elif GPSD_API_MAJOR_VERSION >= 10 ++ if (gpsData->fix.status == STATUS_NO_FIX || gpsData->fix.mode < MODE_2D) + #else +- if (gpsData->status == STATUS_NO_FIX) ++ if (gpsData->status == STATUS_NO_FIX || gpsData->fix.mode < MODE_2D ) + #endif + { + // We have no fix and there is no point in further processing. +@@ -295,24 +299,6 @@ IPState GPSD::updateGPS() + IDSetText(&GPSstatusTP, nullptr); + return IPS_BUSY; + } +- else +- { +- // We may have a fix. Check if fix structure contains proper fix. +- // We require at least 2D fix - the altitude is not so crucial (?) +- if (gpsData->fix.mode < MODE_2D) +- { +- // The position is not realy measured yet - we have no valid data +- // Keep looking +- IUSaveText(&GPSstatusT[0], "NO FIX"); +- if (GPSstatusTP.s == IPS_OK) +- { +- LOG_WARN("GPS fix lost."); +- } +- GPSstatusTP.s = IPS_BUSY; +- IDSetText(&GPSstatusTP, nullptr); +- return IPS_BUSY; +- } +- } + + // detect gps fix showing up after not being avaliable + if (GPSstatusTP.s != IPS_OK) |