mirror of
https://github.com/richardghirst/PiBits.git
synced 2024-11-28 12:24:11 +01:00
Oops, allow "=0" to turn off a servo output.
This commit is contained in:
parent
e603254240
commit
2ea384c0c7
@ -758,11 +758,13 @@ parse_width(int servo, char *width_arg)
|
||||
width = servo_min_ticks;
|
||||
}
|
||||
|
||||
if (width < servo_min_ticks || width > servo_max_ticks) {
|
||||
if (width == 0) {
|
||||
return (int)width;
|
||||
} else if (width < servo_min_ticks || width > servo_max_ticks) {
|
||||
return -1;
|
||||
} else {
|
||||
return (int)width;
|
||||
}
|
||||
|
||||
return (int)width;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user