From 90413f5f16d66b69da2f8d5cd8d989aabb12514b Mon Sep 17 00:00:00 2001 From: "Gary E. Miller" Date: Fri, 8 Apr 2016 17:50:12 -0700 Subject: Fix log message to show real count of stas used. --- libgpsd_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libgpsd_core.c') 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) { -- cgit v1.2.1