summaryrefslogtreecommitdiff
path: root/gpsmon.c
diff options
context:
space:
mode:
authorFred Wright <fw@fwright.net>2016-09-16 18:18:28 -0700
committerGary E. Miller <gem@rellim.com>2016-09-22 16:56:43 -0700
commitc0c9ed85b0d3a199b51b4a9f4eeed7bd24712225 (patch)
treea17c446f4989eb161a72fe0060b3d962e1ef80a5 /gpsmon.c
parent89bc05db05ec3f8f073852a46caa5b37ed87e2e1 (diff)
downloadgpsd-c0c9ed85b0d3a199b51b4a9f4eeed7bd24712225.tar.gz
Fixes inverted offset signs in gpsmon's PPS lines.
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. Signed-off-by: Gary E. Miller <gem@rellim.com>
Diffstat (limited to 'gpsmon.c')
-rw-r--r--gpsmon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gpsmon.c b/gpsmon.c
index 0a7c8eb9..724e4cc4 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) {