px4io: allow set of output rates above 400 and below 50

let the IO board decide if the rate is reasonable, and limit it there

this fixes the rates on ArduCopter, which try for 490
This commit is contained in:
Andrew Tridgell 2013-04-21 14:28:56 +10:00
parent b06098a540
commit 421253e6db
1 changed files with 1 additions and 5 deletions

View File

@ -1336,11 +1336,7 @@ PX4IO::ioctl(file *filep, int cmd, unsigned long arg)
case PWM_SERVO_SET_UPDATE_RATE:
/* set the requested alternate rate */
if ((arg >= 50) && (arg <= 400)) { /* TODO: we could go higher for e.g. TurboPWM */
ret = io_reg_set(PX4IO_PAGE_SETUP, PX4IO_P_SETUP_PWM_ALTRATE, arg);
} else {
ret = -EINVAL;
}
ret = io_reg_set(PX4IO_PAGE_SETUP, PX4IO_P_SETUP_PWM_ALTRATE, arg);
break;
case PWM_SERVO_SELECT_UPDATE_RATE: {