summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorMarc Balmer <mbalmer@cvs.openbsd.org>2006-12-10 16:13:33 +0000
committerMarc Balmer <mbalmer@cvs.openbsd.org>2006-12-10 16:13:33 +0000
commit9a4ce0926fa2cb418e26650757609de24f07598f (patch)
treeff539c3d839571ccea8978d335fc86ac3b04b1e0 /sys/dev/usb
parent1ff003efd053e77d0c224760d86155081e1ddf52 (diff)
restart collecting bits immediately after a parity error, i.e. use the frame
immediately following the corrupt one; there is no no need to skip it by waiting for the next minute gap and the sensor value has valid data one minute earlier than before.
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/udcf.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/usb/udcf.c b/sys/dev/usb/udcf.c
index e281aa8bf66..2db1ff70a99 100644
--- a/sys/dev/usb/udcf.c
+++ b/sys/dev/usb/udcf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udcf.c,v 1.25 2006/12/10 15:42:12 mbalmer Exp $ */
+/* $OpenBSD: udcf.c,v 1.26 2006/12/10 16:13:32 mbalmer Exp $ */
/*
* Copyright (c) 2006 Marc Balmer <mbalmer@openbsd.org>
@@ -492,7 +492,6 @@ void
udcf_mg_probe(void *xsc)
{
struct udcf_softc *sc = xsc;
-
struct clock_ymdhms ymdhm;
struct timeval monotime;
int tdiff_recv, tdiff_local;
@@ -503,7 +502,6 @@ udcf_mg_probe(void *xsc)
int p1_bit, p2_bit, p3_bit;
int r_bit, a1_bit, a2_bit, z1_bit, z2_bit;
int s_bit, m_bit;
-
u_int32_t parity = 0x6996;
if (sc->sc_sync) {
@@ -615,7 +613,7 @@ udcf_mg_probe(void *xsc)
sc->sc_last_tv.tv_sec = monotime.tv_sec;
} else {
DPRINTF(("\nparity error, resync\n"));
- sc->sc_sync = 1;
+ sc->sc_sync = sc->sc_minute = 1;
}
cleanbits: