From: Reg Clemens Date: Thu, 1 Nov 2007 06:13:19 +0000 (-0400) Subject: ntpd/refclock_oncore.c X-Git-Tag: NTP_4_2_5P95~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0067a60155b5fc8bf54e31e54cfca6fb3c313b02;p=thirdparty%2Fntp.git ntpd/refclock_oncore.c The oncore hardware provides a 'negative saw-tooth' the offset of the PPS signal which is on the zero crossing of its internal clock, from its true value. the refclock_oncore.c driver applies this difference to correct the time of the provided timestamp. This value was being applied correctly for the 6 and 8 channel receivers, but not for the 12 channel. This has been corrected. bk: 47296e7fAmHX4WOhSdgdYHJqXvQ-oA --- diff --git a/ntpd/refclock_oncore.c b/ntpd/refclock_oncore.c index 96be77eb3..75c20974f 100644 --- a/ntpd/refclock_oncore.c +++ b/ntpd/refclock_oncore.c @@ -2422,14 +2422,14 @@ oncore_msg_BnEnHn( return; dt1 = instance->saw_tooth + instance->offset; /* dt this time step */ - instance->saw_tooth = (s_char) instance->BEHn[10]; /* update for next time Hn[10] */ + instance->saw_tooth = (s_char) instance->BEHn[14]; /* update for next time Hn[14] */ dt2 = instance->saw_tooth + instance->offset; /* dt next time step */ } else { if (instance->BEHn[21]) /* bad TRAIM */ return; dt1 = instance->saw_tooth + instance->offset; /* dt this time step */ - instance->saw_tooth = (s_char) instance->BEHn[25]; /* update for next time */ + instance->saw_tooth = (s_char) instance->BEHn[25]; /* update for next time Bn[25], En[25] */ dt2 = instance->saw_tooth + instance->offset; /* dt next time step */ }