Skip to content

Commit

Permalink
lib/pud/src/gpsdclient.c: drop handling of gpsdata->fix.status
Browse files Browse the repository at this point in the history
Here is an extract of https://gpsd.gitlab.io/gpsd/gpsd_json.html:

The optional "status" field (aka fix type), is a modifier (adjective) to
mode. It is not a replacement for, or superset of, the "mode" field. It
is almost, but not quite, the same as the NMEA 4.x xxGGA GPS Quality
Indicator Values. Many GNSS receivers do not supply it. Those that do
interpret the specification in various incompatible ways.

So status field is optional and STATUS_NO_FIX has been explicitly
renamed into STATUS_UNK to avoid confusion with MODE_NO_FIX (which is
already handled by gpsdclient.c) so drop the if block to fix the build
failure with gpsd >= 3.23.1.

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  • Loading branch information
ffontaine authored and PolynomialDivision committed Nov 6, 2021
1 parent e427a0d commit 665051a
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions lib/pud/src/gpsdclient.c
Expand Up @@ -370,15 +370,6 @@ void nmeaInfoFromGpsd(struct gps_data_t *gpsdata, NmeaInfo *info, struct GpsdCon
);

gpsdata->set &= ~STATUS_SET; /* always valid */
#if GPSD_API_MAJOR_VERSION >= 10
if (gpsdata->fix.status == STATUS_NO_FIX) {
#else
if (gpsdata->status == STATUS_NO_FIX) {
#endif
nmeaInfoClear(info);
nmeaTimeSet(&info->utc, &info->present, NULL);
return;
}

if (!gpsdata->set) {
return;
Expand Down

0 comments on commit 665051a

Please sign in to comment.