summaryrefslogtreecommitdiff
path: root/ppsthread.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2016-01-04 17:30:05 -0800
committerGary E. Miller <gem@rellim.com>2016-01-04 17:30:05 -0800
commita19b22f0fcf087ae516a8ea07d4e710a1bba45dd (patch)
tree25b1355a07093385ad981a5ed131da56dd30fad1 /ppsthread.c
parentc78e28ace1399d4311900e800404d66ef1d8a742 (diff)
downloadgpsd-a19b22f0fcf087ae516a8ea07d4e710a1bba45dd.tar.gz
Close bug #45083: ppsthread.c:1091: erroneous rejection of PPS?
Anonymous found a bug in my logic... This would have caused rejection of valid PPS pulses in the length of 1.00 Sec to 1.100 Sec, and the inclusion of bad PPS of length 1.101 Sec to 1.999 Sec.
Diffstat (limited to 'ppsthread.c')
-rw-r--r--ppsthread.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ppsthread.c b/ppsthread.c
index e01c4c4d..b05da061 100644
--- a/ppsthread.c
+++ b/ppsthread.c
@@ -1090,8 +1090,9 @@ static void *gpsd_ppsmonitor(void *arg)
delay_str);
log1 = "system clock went backwards";
} else if ( ( 2 < delay.tv_sec)
- || ( 1 == delay.tv_sec && 100000000 > delay.tv_nsec ) ) {
- /* system clock could be slewing so allow 1.1 sec delay */
+ || ( 1 == delay.tv_sec && 100000000 < delay.tv_nsec ) ) {
+ /* system clock could be slewing so allow up to 1.1 sec delay */
+ /* chronyd can slew +/-8.33% */
thread_context->log_hook(thread_context, THREAD_RAW,
"PPS:%s %.10s no current GPS seconds: %.20s\n",
thread_context->devicename,