blob: 6d6f426223422c68fea51addb595e2667512457c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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)
|