1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

drivers/servo: fixed very stupid coding error

This commit is contained in:
Hauke Petersen 2014-07-31 17:35:47 +02:00
parent ae4a668695
commit 10d5b5a781

View File

@ -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);