]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Improvements from Dave Mills.
authorHarlan Stenn <stenn@ntp.org>
Fri, 4 Apr 2003 01:53:35 +0000 (20:53 -0500)
committerHarlan Stenn <stenn@ntp.org>
Fri, 4 Apr 2003 01:53:35 +0000 (20:53 -0500)
bk: 3e8ce59fcRv9iNhezFrn6XDsStnDQQ

ntpd/refclock_wwv.c

index c3282786fd20861003be848e027f420168f01d83..1d8f20a3a5fa09d9ab9f9c65f1aabddaa5febe20 100644 (file)
 #define SSYNC          0x0002  /* second epoch sync */
 #define DSYNC          0x0004  /* minute units sync */
 #define INSYNC         0x0008  /* clock synchronized */
-#define DGATE          0x0010  /* data bit error */
-#define BGATE          0x0020  /* BCD digit bit error */
+#define SLOSS          0x0010  /* minute sync signal lost */
+#define SJITR          0x0020  /* minute sync excessive jitter */
+#define DGATE          0x0040  /* data bit error */
+#define BGATE          0x0080  /* BCD digit bit error */
 #define SFLAG          0x1000  /* probe flag */
 #define LEPSEC         0x2000  /* leap second in progress */
 
@@ -1563,8 +1565,10 @@ wwv_endpoc(
         * jitter is too high for too long a time, we dim the second
         * sync lamp and start over.
         */
+       up->status &= ~(SLOSS | SJITR);
        if (!(up->status & (SELV | SELH)) || up->epomax < STHR ||
            up->eposnr < SSNR) {
+               up->status |= SLOSS;
                up->status &= ~SSYNC;
                jitcnt = syncnt = avgcnt = 0;
                return;
@@ -1586,6 +1590,7 @@ wwv_endpoc(
                        }
                }
        } else {
+               up->status |= SJITR;
                jitcnt++;
                syncnt = 0;
        }