summaryrefslogtreecommitdiff
path: root/libgpsd_core.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2016-04-08 17:50:12 -0700
committerGary E. Miller <gem@rellim.com>2016-04-08 17:50:12 -0700
commit90413f5f16d66b69da2f8d5cd8d989aabb12514b (patch)
treef3fdc6dc89053076eddacf76e0b0ff9ecaec3573 /libgpsd_core.c
parent7acb40ffe4759930f31710999b2c91daadcc14c2 (diff)
downloadgpsd-90413f5f16d66b69da2f8d5cd8d989aabb12514b.tar.gz
Fix log message to show real count of stas used.
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r--libgpsd_core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libgpsd_core.c b/libgpsd_core.c
index 9370db6d..12655a55 100644
--- a/libgpsd_core.c
+++ b/libgpsd_core.c
@@ -714,7 +714,6 @@ static gps_mask_t fill_dop(const struct gpsd_errout_t *errout,
memset(satpos, 0, sizeof(satpos));
- gpsd_log(errout, LOG_INF, "Sats used (%d):\n", gpsdata->satellites_used);
for (n = k = 0; k < gpsdata->satellites_visible; k++) {
if (gpsdata->skyview[k].used && !SBAS_PRN(gpsdata->skyview[k].PRN))
{
@@ -733,6 +732,9 @@ static gps_mask_t fill_dop(const struct gpsd_errout_t *errout,
n++;
}
}
+ /* can't use gpsdata->satellites_used as that is a counter for xxGSA,
+ * and gets cleared at odd times */
+ gpsd_log(errout, LOG_INF, "Sats used (%d):\n", n);
/* If we don't have 4 satellites then we don't have enough information to calculate DOPS */
if (n < 4) {