diff options
author | Chris Kuethe <chris.kuethe@gmail.com> | 2007-12-27 07:21:29 +0000 |
---|---|---|
committer | Chris Kuethe <chris.kuethe@gmail.com> | 2007-12-27 07:21:29 +0000 |
commit | 27be3e0081c3863a23bf527a56c87590c993b877 (patch) | |
tree | 41e52f2b2134e756a94b22443afaff58dfbb1bd9 /driver_proto.c | |
parent | 9fc266d9492550ba97672ec547fbfdca49c89aa5 (diff) | |
download | gpsd-27be3e0081c3863a23bf527a56c87590c993b877.tar.gz |
fix my fix of satellite info parsing
Diffstat (limited to 'driver_proto.c')
-rw-r--r-- | driver_proto.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/driver_proto.c b/driver_proto.c index 1709626c..ea72f402 100644 --- a/driver_proto.c +++ b/driver_proto.c @@ -160,7 +160,7 @@ proto_msg_nav_svinfo(struct gps_device_t *session, unsigned char *buf, size_t da nchan = GET_NUMBER_OF_CHANNELS(); gpsd_zero_satellites(&session->gpsdata); nsv = 0; /* number of actually used satellites */ - for (i = 0; i < nchan; i++) { + for (i = st = 0; i < nchan; i++) { /* get info for one channel/satellite */ int off = GET_CHANNEL_STATUS(i); @@ -172,9 +172,11 @@ proto_msg_nav_svinfo(struct gps_device_t *session, unsigned char *buf, size_t da if (CHANNEL_USED_IN_SOLUTION(i)) session->gpsdata.used[nsv++] = session->gpsdata.PRN[i]; + if(session->gpsdata.PRN[i]) + st++; } session->gpsdata.satellites_used = nsv; - session->gpsdata.satellites = nchan; + session->gpsdata.satellites = st; return SATELLITE_SET | USED_SET; } |