From 10d5b5a781abaf32727a935cbf806c0241cec276 Mon Sep 17 00:00:00 2001 From: Hauke Petersen Date: Thu, 31 Jul 2014 17:35:47 +0200 Subject: [PATCH] drivers/servo: fixed very stupid coding error --- drivers/servo/servo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/servo/servo.c b/drivers/servo/servo.c index a3265c451c..8d473cd43b 100644 --- a/drivers/servo/servo.c +++ b/drivers/servo/servo.c @@ -39,7 +39,7 @@ int servo_set(servo_t *dev, unsigned int pos) if (pos > dev->max) { pos = dev->max; } - else (pos < dev->min) { + else if (pos < dev->min) { pos = dev->min; } return pwm_set(dev->device, dev->channel, pos);