diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-10-01 14:09:53 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-10-01 14:09:53 +0000 |
commit | b16ea563ea36a4dbbcc436bc8bc42be123c2b164 (patch) | |
tree | 5193122aea2d16abc29bbcd8692d5df77437fe30 /gpsd.c | |
parent | c22357187db715079b9cf3167da0b486480180ba (diff) | |
download | gpsd-b16ea563ea36a4dbbcc436bc8bc42be123c2b164.tar.gz |
In the gpsdata structure, satellites -> satellites_visible
All regression tests pass, code splints clean.
Diffstat (limited to 'gpsd.c')
-rw-r--r-- | gpsd.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -1470,7 +1470,7 @@ static bool handle_oldstyle(struct subscriber_t *sub, char *buf, (void)strlcpy(phrase, ",X=?", sizeof(phrase)); break; case 'Y': - if ((channel=mandatory_assign_channel(sub, GPS, NULL))!= NULL && channel->device->gpsdata.satellites > 0) { + if ((channel=mandatory_assign_channel(sub, GPS, NULL))!= NULL && channel->device->gpsdata.satellites_visible > 0) { int used, reported = 0; (void)strlcpy(phrase, ",Y=", sizeof(phrase)); if (channel->device->gpsdata.tag[0] != '\0') @@ -1485,13 +1485,13 @@ static bool handle_oldstyle(struct subscriber_t *sub, char *buf, else (void)strlcat(phrase, " ? ", sizeof(phrase)); /* insurance against flaky drivers */ - for (i = 0; i < channel->device->gpsdata.satellites; i++) + for (i = 0; i < channel->device->gpsdata.satellites_visible; i++) if (channel->device->gpsdata.PRN[i]) reported++; (void)snprintf(phrase+strlen(phrase), sizeof(phrase)-strlen(phrase), "%d:", reported); - for (i = 0; i < channel->device->gpsdata.satellites; i++) { + for (i = 0; i < channel->device->gpsdata.satellites_visible; i++) { used = 0; for (j = 0; j < channel->device->gpsdata.satellites_used; j++) if (channel->device->gpsdata.used[j] == channel->device->gpsdata.PRN[i]) { @@ -1508,9 +1508,9 @@ static bool handle_oldstyle(struct subscriber_t *sub, char *buf, used); } } - if (channel->device->gpsdata.satellites != reported) + if (channel->device->gpsdata.satellites_visible != reported) gpsd_report(LOG_WARN,"Satellite count %d != PRN count %d\n", - channel->device->gpsdata.satellites, reported); + channel->device->gpsdata.satellites_visible, reported); } else (void)strlcpy(phrase, ",Y=?", sizeof(phrase)); break; |