diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2013-09-21 02:19:27 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-09-21 02:19:27 -0400 |
commit | 5a7ae949353f394ff16762460b951953d0eee4d5 (patch) | |
tree | de1b3da86562b16ed6303e3b6ed7a81d1692bd26 | |
parent | 4e6f464178622bcab7cd8b56d43655e2a19b3457 (diff) | |
download | gpsd-5a7ae949353f394ff16762460b951953d0eee4d5.tar.gz |
Fix some minor bugs in debug reporting of the sat picture.
-rw-r--r-- | libgps_core.c | 7 | ||||
-rw-r--r-- | libgpsd_core.c | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/libgps_core.c b/libgps_core.c index 3ad9716d..1c8aea9a 100644 --- a/libgps_core.c +++ b/libgps_core.c @@ -334,10 +334,15 @@ void libgps_dump_state(struct gps_data_t *collect) (void)fprintf(debugfp, "SKY: satellites in view: %d\n", collect->satellites_visible); for (i = 0; i < collect->satellites_visible; i++) { + bool used_in_solution = false; + int j; + for (j = 0; j < ; j++) + if (collect->used == i) + used_in_solution = true; (void)fprintf(debugfp, " %2.2d: %2.2d %3.3d %3.0f %c\n", collect->PRN[i], collect->elevation[i], collect->azimuth[i], collect->ss[i], - collect->used[i] ? 'Y' : 'N'); + used_in_solution ? 'Y' : 'N'); } } if (collect->set & DEVICE_SET) diff --git a/libgpsd_core.c b/libgpsd_core.c index e861bbe1..d18f0333 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -615,10 +615,14 @@ static gps_mask_t fill_dop(const struct gps_data_t * gpsdata, struct dop_t * dop #ifdef __UNUSED__ gpsd_report(LOG_INF, "Satellite picture:\n"); for (k = 0; k < MAXCHANNELS; k++) { + bool used_in_solution = false; + for (j = 0; j < ; j++) + if (collect->used == i) + used_in_solution = true; if (gpsdata->used[k]) gpsd_report(LOG_INF, "az: %d el: %d SV: %d\n", gpsdata->azimuth[k], gpsdata->elevation[k], - gpsdata->used[k]); + used_in_solution); } #endif /* __UNUSED__ */ |