gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gpsd-dev] [PATCH 3/3] Fixes inverted offset signs in gpsmon's PPS lines


From: Fred Wright
Subject: [gpsd-dev] [PATCH 3/3] Fixes inverted offset signs in gpsmon's PPS lines.
Date: Fri, 16 Sep 2016 18:18:28 -0700

In gpsmon, the PPS offsets reported in the display pane and in the
scrolling packet data has opposite signs.  Since the display version
is consistent with the value reported by the ppswatch utility
(from the pps-tools package), this is assumed to be the correct
version, and the "text" version is corrected to match.

TESTED:
Ran gpsmon on both OSX and Linux, verifying that the two forms
of PPS offset reported by gpsmon and the ppswatch version are all
consistent.
---
 gpsmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gpsmon.c b/gpsmon.c
index 0a7c8eb..724e4cc 100644
--- a/gpsmon.c
+++ b/gpsmon.c
@@ -770,7 +770,7 @@ static void gpsmon_hook(struct gps_device_t *device, 
gps_mask_t changed UNUSED)
            struct timespec timedelta;
            char timedelta_str[TIMESPEC_LEN];
 
-           TS_SUB( &timedelta, &noclobber.pps.real, &noclobber.pps.clock);
+           TS_SUB( &timedelta, &noclobber.pps.clock, &noclobber.pps.real);
            timespec_str( &timedelta, timedelta_str, sizeof(timedelta_str) );
 
            if (!curses_active) {
-- 
2.9.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]