0005-lib-pud-src-gpsdclient.c-drop-handling-of-gpsdata-fi.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. From 665051a845464c0f95edb81432104dac39426f79 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Sat, 6 Nov 2021 15:50:58 +0100
  4. Subject: [PATCH] lib/pud/src/gpsdclient.c: drop handling of
  5. gpsdata->fix.status
  6. Here is an extract of https://gpsd.gitlab.io/gpsd/gpsd_json.html:
  7. The optional "status" field (aka fix type), is a modifier (adjective) to
  8. mode. It is not a replacement for, or superset of, the "mode" field. It
  9. is almost, but not quite, the same as the NMEA 4.x xxGGA GPS Quality
  10. Indicator Values. Many GNSS receivers do not supply it. Those that do
  11. interpret the specification in various incompatible ways.
  12. So status field is optional and STATUS_NO_FIX has been explicitly
  13. renamed into STATUS_UNK to avoid confusion with MODE_NO_FIX (which is
  14. already handled by gpsdclient.c) so drop the if block to fix the build
  15. failure with gpsd >= 3.23.1.
  16. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  17. [Upstream: https://github.com/OLSR/olsrd/commit/665051a845464c0f95edb81432104dac39426f79]
  18. Signed-off-by: Peter Seiderer <ps.report@gmx.net>
  19. ---
  20. lib/pud/src/gpsdclient.c | 9 ---------
  21. 1 file changed, 9 deletions(-)
  22. diff --git a/lib/pud/src/gpsdclient.c b/lib/pud/src/gpsdclient.c
  23. index a2a9cee0..d448867d 100644
  24. --- a/lib/pud/src/gpsdclient.c
  25. +++ b/lib/pud/src/gpsdclient.c
  26. @@ -370,15 +370,6 @@ void nmeaInfoFromGpsd(struct gps_data_t *gpsdata, NmeaInfo *info, struct GpsdCon
  27. );
  28. gpsdata->set &= ~STATUS_SET; /* always valid */
  29. - #if GPSD_API_MAJOR_VERSION >= 10
  30. - if (gpsdata->fix.status == STATUS_NO_FIX) {
  31. - #else
  32. - if (gpsdata->status == STATUS_NO_FIX) {
  33. - #endif
  34. - nmeaInfoClear(info);
  35. - nmeaTimeSet(&info->utc, &info->present, NULL);
  36. - return;
  37. - }
  38. if (!gpsdata->set) {
  39. return;
  40. --
  41. 2.33.1