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_nmea2000.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_nmea2000.c')
-rw-r--r-- | driver_nmea2000.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/driver_nmea2000.c b/driver_nmea2000.c index 7f2474c5..d9b6e557 100644 --- a/driver_nmea2000.c +++ b/driver_nmea2000.c @@ -367,7 +367,7 @@ static gps_mask_t hnd_129539(unsigned char *bu, int len, PGN *pgn, struct gps_de */ static gps_mask_t hnd_129540(unsigned char *bu, int len, PGN *pgn, struct gps_device_t *session) { - int l1, l2; + int l1; print_data(session->context, bu, len, pgn); gpsd_report(&session->context->errout, LOG_DATA, @@ -377,8 +377,6 @@ static gps_mask_t hnd_129540(unsigned char *bu, int len, PGN *pgn, struct gps_de session->gpsdata.satellites_visible = (int)bu[2]; memset(session->gpsdata.skyview, '\0', sizeof(session->gpsdata.skyview)); - memset(session->sats_used, 0, sizeof(session->sats_used)); - l2 = 0; for (l1=0;l1<session->gpsdata.satellites_visible;l1++) { int svt; double azi, elev, snr; @@ -398,8 +396,6 @@ static gps_mask_t hnd_129540(unsigned char *bu, int len, PGN *pgn, struct gps_de session->gpsdata.skyview[l1].used = false; if ((svt == 2) || (svt == 5)) { session->gpsdata.skyview[l1].used = true; - session->sats_used[l2] = (unsigned short) session->gpsdata.skyview[l1].PRN; - l2 += 1; } } session->driver.nmea2000.mode_valid |= 2; |