summaryrefslogtreecommitdiff
path: root/driver_superstar2.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_superstar2.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_superstar2.c')
-rw-r--r--driver_superstar2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/driver_superstar2.c b/driver_superstar2.c
index 5334e9a5..9dd0de87 100644
--- a/driver_superstar2.c
+++ b/driver_superstar2.c
@@ -7,6 +7,7 @@
#include <time.h>
#include <string.h>
#include <math.h>
+#include <stdlib.h>
#include "gpsd.h"
@@ -161,7 +162,7 @@ superstar2_msg_navsol_lla(struct gps_device_t *session,
return mask;
}
-/**
+/*
* GPS Satellite Info
*/
static gps_mask_t
@@ -179,7 +180,6 @@ superstar2_msg_svinfo(struct gps_device_t *session,
nchan = 12;
gpsd_zero_satellites(&session->gpsdata);
nsv = 0; /* number of actually used satellites */
- memset(session->sats_used, 0, sizeof(session->sats_used));
for (i = st = 0; i < nchan; i++) {
/* get info for one channel/satellite */
int off = i * 5 + 5;
@@ -196,7 +196,7 @@ superstar2_msg_svinfo(struct gps_device_t *session,
session->gpsdata.skyview[i].used = used;
/*@ +charint @*/
if (used)
- session->sats_used[nsv++] = session->gpsdata.skyview[i].PRN;
+ nsv++;
/*@ -charint @*/
if (session->gpsdata.skyview[i].PRN)