mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge pull request #1506 from haukepetersen/fix_driver_servo
drivers/servo: fixed very stupid coding error
This commit is contained in:
commit
5e8517d956
@ -39,7 +39,7 @@ int servo_set(servo_t *dev, unsigned int pos)
|
|||||||
if (pos > dev->max) {
|
if (pos > dev->max) {
|
||||||
pos = dev->max;
|
pos = dev->max;
|
||||||
}
|
}
|
||||||
else (pos < dev->min) {
|
else if (pos < dev->min) {
|
||||||
pos = dev->min;
|
pos = dev->min;
|
||||||
}
|
}
|
||||||
return pwm_set(dev->device, dev->channel, pos);
|
return pwm_set(dev->device, dev->channel, pos);
|
||||||
|
Loading…
Reference in New Issue
Block a user