pwm_output: Allow PWM values from 900us to 2100us but use a default of 1000us to 2000us

This commit is contained in:
Julian Oes
2013-10-31 10:29:06 +01:00
parent 88351f3da1
commit 25bf1abecf
5 changed files with 48 additions and 38 deletions
+1 -1
View File
@@ -1985,7 +1985,7 @@ PX4IO::ioctl(file * /*filep*/, int cmd, unsigned long arg)
/* TODO: we could go lower for e.g. TurboPWM */
unsigned channel = cmd - PWM_SERVO_SET(0);
if ((channel >= _max_actuators) || (arg < PWM_MIN) || (arg > PWM_MAX)) {
if ((channel >= _max_actuators) || (arg < PWM_LOWEST_MIN) || (arg > PWM_HIGHEST_MAX)) {
ret = -EINVAL;
} else {