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_navcom.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_navcom.c')
-rw-r--r-- | driver_navcom.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/driver_navcom.c b/driver_navcom.c index 8a40fd0b..3e08af3d 100644 --- a/driver_navcom.c +++ b/driver_navcom.c @@ -746,7 +746,6 @@ static gps_mask_t handle_0x86(struct gps_device_t *session) /* Satellite details */ i = nsu = 0; - memset(session->sats_used, 0, sizeof(session->sats_used)); for (n = 17; n < msg_len; n += 14) { if (i >= MAXCHANNELS) { gpsd_report(&session->context->errout, LOG_ERROR, @@ -796,8 +795,9 @@ static gps_mask_t handle_0x86(struct gps_device_t *session) /*@ ignore @*//* splint is confused */ s = session->gpsdata.skyview[i++].ss = (p2_snr ? p2_snr : ca_snr) / 4.0; /*@ end @*/ + session->gpsdata.skyview[i].used = (stat == 0xff); if (stat == 0xff) - session->sats_used[nsu++] = prn; + nsu++; } session->gpsdata.satellites_used = nsu; gpsd_report(&session->context->errout, LOG_DATA, |