From f44412cf25c4766ca6f639f8de7922a6b36e3518 Mon Sep 17 00:00:00 2001 From: "Gary E. Miller" Date: Fri, 17 Dec 2010 18:09:05 -0800 Subject: Tweaks to PPS logging. --- libgpsd_core.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'libgpsd_core.c') diff --git a/libgpsd_core.c b/libgpsd_core.c index 137721d8..5245f8e6 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -425,16 +425,17 @@ static /*@null@*/ void *gpsd_ppsmonitor(void *arg) kpps_edge = 0; tv_kpps = pi.clear_timestamp; } - gpsd_report(LOG_PROG, "KPPS data: using %s," - "assert %ld.%09ld, sequence: %ld - " + gpsd_report(LOG_PROG, "assert %ld.%09ld, sequence: %ld - " "clear %ld.%09ld, sequence: %ld\n", - kpps_edge ? "assert" : "clear", pi.assert_timestamp.tv_sec, pi.assert_timestamp.tv_nsec, pi.assert_sequence, pi.clear_timestamp.tv_sec, pi.clear_timestamp.tv_nsec, pi.clear_sequence); + gpsd_report(LOG_PROG, "KPPS data: using %s", + kpps_edge ? "assert" : "clear"); + #define timediff_kpps(x, y) (int)((x.tv_sec-y.tv_sec)*1000000+((x.tv_nsec-y.tv_nsec)/1000)) cycle_kpps = timediff_kpps(tv_kpps, pulse_kpps[kpps_edge]); duration_kpps = timediff_kpps(tv_kpps, pulse_kpps[(int)(kpps_edge == 0)]); @@ -492,7 +493,7 @@ static /*@null@*/ void *gpsd_ppsmonitor(void *arg) // strange, try again continue; } - gpsd_report(LOG_INF, "PPS cycle: %d, duration: %d @ %lu.%06lu\n", + gpsd_report(LOG_INF, "PPS cycle: %7d, duration: %7d @ %lu.%06lu\n", cycle, duration, (unsigned long)tv.tv_sec, (unsigned long)tv.tv_usec); -- cgit v1.2.1