diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2015-01-10 13:14:12 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-01-10 13:14:12 -0500 |
commit | 0fcb2da0c5ae748c64c3c6f09f0dd8f7998f74f2 (patch) | |
tree | 0d0a35034245df150af29ac58c100723079fd1cc /driver_nmea0183.c | |
parent | a950067545c52db618154994f76a5659d1be558c (diff) | |
download | gpsd-0fcb2da0c5ae748c64c3c6f09f0dd8f7998f74f2.tar.gz |
Almost entirely eliminate use of sats_used array.
Instead, set the used member in the satellites array directly where possible.
The NMEA0183 and TSIP drivers still need a local equivalent.
This changes pseudo-NMEA GSA output in several binary-protocol tests.
Diffstat (limited to 'driver_nmea0183.c')
-rw-r--r-- | driver_nmea0183.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/driver_nmea0183.c b/driver_nmea0183.c index e2e22029..30ff3b94 100644 --- a/driver_nmea0183.c +++ b/driver_nmea0183.c @@ -509,12 +509,12 @@ static gps_mask_t processGSA(int count, char *field[], if (field[17][0]) session->gpsdata.dop.vdop = safe_atof(field[17]); session->gpsdata.satellites_used = 0; - memset(session->sats_used, 0, sizeof(session->sats_used)); + memset(session->nmea.sats_used, 0, sizeof(session->nmea.sats_used)); /* the magic 6 here counts the tag, two mode fields, and the DOP fields */ for (i = 0; i < count - 6; i++) { int prn = atoi(field[i + 3]); if (prn > 0) - session->sats_used[session->gpsdata.satellites_used++] = + session->nmea.sats_used[session->gpsdata.satellites_used++] = prn; } mask |= DOP_SET | USED_IS; @@ -604,7 +604,7 @@ static gps_mask_t processGSV(int count, char *field[], sp->used = false; if (sp->PRN > 0) for (n = 0; n < MAXCHANNELS; n++) - if (session->sats_used[n] == sp->PRN) { + if (session->nmea.sats_used[n] == sp->PRN) { sp->used = true; break; } |