icE1usb fw/gpsdo: Never use invalid measurements to feed loop
Signed-off-by: Sylvain Munaut <tnt@246tNt.com> Change-Id: I9c7b81c6e2e600ed49ac766fa33df23747dd339e
This commit is contained in:
parent
28eb5d1b96
commit
8014c3cd09
|
@ -286,10 +286,11 @@ gpsdo_poll(void)
|
|||
} else {
|
||||
/* Count invalid measurements and if too many of
|
||||
* them, we go back to hold-over */
|
||||
if (++g_gpsdo.meas.invalid >= MAX_INVALID) {
|
||||
if (++g_gpsdo.meas.invalid >= MAX_INVALID)
|
||||
g_gpsdo.state = STATE_HOLD_OVER;
|
||||
return;
|
||||
}
|
||||
|
||||
/* In all cases, invalid measurements are not used */
|
||||
return;
|
||||
}
|
||||
|
||||
g_gpsdo.meas.invalid = 0;
|
||||
|
|
Loading…
Reference in New Issue