Add missing state setting in PI servo when date check fails.
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>master
parent
0bf412d24b
commit
f657e47c26
1
pi.c
1
pi.c
|
@ -76,6 +76,7 @@ static double pi_sample(struct servo *servo,
|
||||||
|
|
||||||
/* Make sure the first sample is older than the second. */
|
/* Make sure the first sample is older than the second. */
|
||||||
if (s->local[0] >= s->local[1]) {
|
if (s->local[0] >= s->local[1]) {
|
||||||
|
*state = SERVO_UNLOCKED;
|
||||||
s->count = 0;
|
s->count = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue