From b917689d78dff4f27fd452bb8967a8000ff8395c Mon Sep 17 00:00:00 2001 From: Piotr Figiel Date: Mon, 18 Sep 2017 11:53:17 +0200 Subject: [PATCH] nmea 0183: report MODE_NO_FIX when there is no fix It was observed that with some receivers gpsd failed to send TPV notifications with mode = MODE_NO_FIX when the fix was lost and nmea0183 driver was in use. This commit fixes the issue. --- driver_nmea0183.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/driver_nmea0183.c b/driver_nmea0183.c index 94cf4dc..18082e7 100644 --- a/driver_nmea0183.c +++ b/driver_nmea0183.c @@ -180,16 +180,9 @@ static gps_mask_t processRMC(int count, char *field[], if (strcmp(field[2], "V") == 0) { /* copes with Magellan EC-10X, see below */ - if (session->gpsdata.status != STATUS_NO_FIX) { - session->gpsdata.status = STATUS_NO_FIX; - mask |= STATUS_SET; - } - if (session->newdata.mode >= MODE_2D) { - session->newdata.mode = MODE_NO_FIX; - mask |= MODE_SET; - } - /* set something nz, so it won't look like an unknown sentence */ - mask |= ONLINE_SET; + session->gpsdata.status = STATUS_NO_FIX; + session->newdata.mode = MODE_NO_FIX; + mask |= STATUS_SET | MODE_SET | CLEAR_IS | REPORT_IS | ONLINE_SET; } else if (strcmp(field[2], "A") == 0) { /* * The MTK3301, Royaltek RGM-3800, and possibly other -- 2.7.4