]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
ntpd/refclock_oncore.c
authorReg Clemens <clemens@ntp.org>
Thu, 1 Nov 2007 06:13:19 +0000 (02:13 -0400)
committerReg Clemens <clemens@ntp.org>
Thu, 1 Nov 2007 06:13:19 +0000 (02:13 -0400)
    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

ntpd/refclock_oncore.c

index 96be77eb385d158c58d8696aa640d22ee21f8802..75c20974fea356adb97f74d10ce1acef31cbcc1e 100644 (file)
@@ -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 */
        }