summaryrefslogtreecommitdiff
path: root/driver_sirf.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2015-01-10 13:14:12 -0500
committerEric S. Raymond <esr@thyrsus.com>2015-01-10 13:14:12 -0500
commit0fcb2da0c5ae748c64c3c6f09f0dd8f7998f74f2 (patch)
tree0d0a35034245df150af29ac58c100723079fd1cc /driver_sirf.c
parenta950067545c52db618154994f76a5659d1be558c (diff)
downloadgpsd-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_sirf.c')
-rw-r--r--driver_sirf.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/driver_sirf.c b/driver_sirf.c
index 8c609822..89f8f010 100644
--- a/driver_sirf.c
+++ b/driver_sirf.c
@@ -582,7 +582,6 @@ static gps_mask_t sirf_msg_svinfo(struct gps_device_t *session,
(unsigned int)getbeu32(buf, 3) * 1e-2);
gpsd_zero_satellites(&session->gpsdata);
- memset(session->sats_used, 0, sizeof(session->sats_used));
for (i = st = nsv = 0; i < SIRF_CHANNELS; i++) {
int cn, prn;
int off = 8 + 15 * i;
@@ -613,7 +612,7 @@ static gps_mask_t sirf_msg_svinfo(struct gps_device_t *session,
if (good != 0) {
st += 1;
if (stat & 0x01)
- session->sats_used[nsv++] = prn;
+ nsv++;
}
}
session->gpsdata.satellites_visible = st;
@@ -624,10 +623,7 @@ static gps_mask_t sirf_msg_svinfo(struct gps_device_t *session,
if (SBAS_PRN(prn) \
&& session->gpsdata.status == STATUS_DGPS_FIX \
&& session->driver.sirf.dgps_source == SIRF_DGPS_SOURCE_SBAS)
- {
session->gpsdata.skyview[i].used = true;
- session->sats_used[nsv++] = prn;
- }
}
#ifdef TIMEHINT_ENABLE
if (st < 3) {