From f657e47c262b66760df51f9c469056995dfdc70c Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Tue, 18 Jun 2013 12:09:36 +0200 Subject: [PATCH] Add missing state setting in PI servo when date check fails. Signed-off-by: Miroslav Lichvar --- pi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/pi.c b/pi.c index 427cb3e..78cbd3f 100644 --- a/pi.c +++ b/pi.c @@ -76,6 +76,7 @@ static double pi_sample(struct servo *servo, /* Make sure the first sample is older than the second. */ if (s->local[0] >= s->local[1]) { + *state = SERVO_UNLOCKED; s->count = 0; break; }