diff options
author | Gary E. Miller <gem@rellim.com> | 2010-12-17 18:09:05 -0800 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2010-12-17 18:09:05 -0800 |
commit | f44412cf25c4766ca6f639f8de7922a6b36e3518 (patch) | |
tree | 2503d8fb6b4d20a6c8d54f731ca250cf93034053 /libgpsd_core.c | |
parent | b7894ceb6428c576b2e327360088045a488498cb (diff) | |
download | gpsd-f44412cf25c4766ca6f639f8de7922a6b36e3518.tar.gz |
Tweaks to PPS logging.
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r-- | libgpsd_core.c | 9 |
1 files changed, 5 insertions, 4 deletions
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); |