From 0fcb2da0c5ae748c64c3c6f09f0dd8f7998f74f2 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 10 Jan 2015 13:14:12 -0500 Subject: 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. --- driver_navcom.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'driver_navcom.c') 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, -- cgit v1.2.1