diff options
author | Gary E. Miller <gem@rellim.com> | 2015-04-01 11:03:19 -0700 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2015-04-01 11:04:36 -0700 |
commit | c505988baec87349337b61ccf4c2dfe31457a34f (patch) | |
tree | 0968b550c9ba0759794c1b92b06f4716a7a33e3e /timehint.c | |
parent | 89e84cb61eebfd104e59ba937b03944ce27ed782 (diff) | |
download | gpsd-c505988baec87349337b61ccf4c2dfe31457a34f.tar.gz |
Remove validations on /dev/pps0 time that can never work.
/dev/pps0 now ships time to NTP SHM. Very wrong time...
last_fixtime is all wacky...
Diffstat (limited to 'timehint.c')
-rw-r--r-- | timehint.c | 34 |
1 files changed, 20 insertions, 14 deletions
@@ -351,20 +351,26 @@ static char *report_hook(volatile struct pps_thread_t *pps_thread, char *log1; struct gps_device_t *session = (struct gps_device_t *)pps_thread->context; - if (!session->ship_to_ntpd) - return "skipped ship_to_ntp=0"; - - /* - * Only listen to PPS after several consecutive fixes, - * otherwise time may be inaccurate. (We know this is - * required on all Garmin and u-blox; safest to do it - * for all cases as we have no other general way to know - * if PPS is good. - * - * Not sure yet how to handle u-blox UBX_MODE_TMONLY - */ - if (session->fixcnt <= PPS_MIN_FIXES) - return "no fix"; + /* PPS only source never get any serial info + * so no PPSTIME_IS or fixcnt */ + if ( source_pps != session->sourcetype) { + /* FIXME! these two validations need to move back into ppsthread.c */ + + if ( !session->ship_to_ntpd) + return "skipped ship_to_ntp=0"; + + /* + * Only listen to PPS after several consecutive fixes, + * otherwise time may be inaccurate. (We know this is + * required on all Garmin and u-blox; safest to do it + * for all cases as we have no other general way to know + * if PPS is good. + * + * Not sure yet how to handle u-blox UBX_MODE_TMONLY + */ + if (session->fixcnt <= PPS_MIN_FIXES) + return "no fix"; + } log1 = "accepted"; if ( 0 <= session->chronyfd ) { |