diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2014-09-22 10:16:48 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2014-09-22 10:16:48 -0400 |
commit | f63bdafc18991624b872e9efa858c024834a540e (patch) | |
tree | 8051996a6ffa3d73e3c2ed9b5ed790763e35d0ee /pseudonmea.c | |
parent | ecbf0b51cdd43b8dad219e29dd5aaa1e71de4e43 (diff) | |
download | gpsd-f63bdafc18991624b872e9efa858c024834a540e.tar.gz |
Fix an odd little bug in pseudo-NMEA reporting.
Um. What was I thinking when I wrote that guard? It zeroed out
reports of satellites used.
Required a rebuild of the following (binary-orotocol) test logs.
test/daemon/bu303-climbing.log.chk
test/daemon/bu303-moving.log.chk
test/daemon/bu303-stillfix.log.chk
test/daemon/italk-binary.log.chk
test/daemon/navcom.log.chk
test/daemon/superstar2.log.chk
test/daemon/trimble-lassen_iq-3dfix.log.chk
test/daemon/trimble-lassen_iq.log.chk
test/daemon/ublox-aek-4t.log.chk
test/daemon/ublox-lea-4t.log.chk
test/daemon/ublox-sirf1.log.chk
test/daemon/zodiac.log.chk
After that, all regressiion tests pass.
Diffstat (limited to 'pseudonmea.c')
-rw-r--r-- | pseudonmea.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pseudonmea.c b/pseudonmea.c index 998f595c..fd6bff80 100644 --- a/pseudonmea.c +++ b/pseudonmea.c @@ -164,7 +164,6 @@ static void gpsd_binary_quality_dump(struct gps_device_t *session, char bufp[], size_t len) { char *bufp2 = bufp; - bool used_valid = (session->gpsdata.set & USED_IS) != 0; if (session->device_type != NULL && (session->gpsdata.set & MODE_SET) != 0) { int i, j; @@ -173,11 +172,11 @@ static void gpsd_binary_quality_dump(struct gps_device_t *session, "$GPGSA,%c,%d,", 'A', session->gpsdata.fix.mode); j = 0; for (i = 0; i < session->device_type->channels; i++) { - if (session->gpsdata.used[i]) { + if (session->gpsdata.used[i] > 0) { bufp += strlen(bufp); (void)snprintf(bufp, len - strlen(bufp), - "%02d,", - used_valid ? session->gpsdata.used[i] : 0); + "%d,", + session->gpsdata.used[i]); j++; } } |