]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
cleanup from Dave Mills
authorHarlan Stenn <stenn@ntp.org>
Thu, 8 Dec 2005 04:23:03 +0000 (23:23 -0500)
committerHarlan Stenn <stenn@ntp.org>
Thu, 8 Dec 2005 04:23:03 +0000 (23:23 -0500)
bk: 4397b527hqQHwchuOYqqk3p4Eq7MfQ

ntpd/refclock_irig.c
ntpd/refclock_wwv.c

index ad5ab41bc320aebdd8701950894cf3be8257e8a4..2fa2f2ace70c82faf6a74eeb37e65bb4e22c1d94 100644 (file)
@@ -690,6 +690,7 @@ irig_base(
         */
        if (up->carphase != 7)
                return;
+
        env = (up->lastenv[2] - up->lastenv[6]) / 2.;
        lope = (up->lastint[2] - up->lastint[6]) / 2.;
        if (lope > up->intmax)
@@ -939,11 +940,8 @@ irig_decode(
                        else
                                pp->leap = LEAP_NOWARNING;
                        up->second = (up->second + up->decim) % 60;
-                       if (pp->year > 0) {
+                       if (pp->year > 0)
                                pp->year += 2000;
-                               if (syncchar == '0')
-                                       up->errflg |= IRIG_ERR_CHECK;
-                       }
                        if (pp->second != up->second)
                                up->errflg |= IRIG_ERR_CHECK;
                        up->second = pp->second;
@@ -993,6 +991,7 @@ irig_poll(
        if (pp->coderecv == pp->codeproc) {
                refclock_report(peer, CEVNT_TIMEOUT);
                return;
+
        } else {
                refclock_receive(peer);
                record_clock_stats(&peer->srcadr, pp->a_lastcode);
index 3355d7b5fe970ded8ef1ce01c06cdf5d8d013f90..7173a2259aaf3f117df00930aa619f5e784f4a07 100644 (file)
  * unless the mode keyword on the server configuration command specifies
  * a nonzero ICOM ID select code. The C-IV trace is turned on if the
  * debug level is greater than one.
+ *
+ * Fudge factors
+ *
+ * Fudge flag4 causes the dubugging output described above to be
+ * recorded in the clockstats file. Fudge flag2 selects the audio input
+ * port, where 0 is the mike port (default) and 1 is the line-in port.
+ * It does not seem useful to select the compact disc player port. Fudge
+ * flag3 enables audio monitoring of the input signal. For this purpose,
+ * the monitor gain is set to a default value. Fudgetime2 is used as a
+ * frequency vernier for broken codec sample frequency.
  */
 /*
  * General definitions. Note the DGAIN parameter might need to be
@@ -818,6 +828,7 @@ wwv_receive(
                 * 125 PPM.
                 */
                up->phase += up->freq / SECOND;
+               up->phase += pp->fudgetime2 / 1e6;
                if (up->phase >= .5) {
                        up->phase -= 1.;
                } else if (up->phase < -.5) {