Browse Source

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
sbg
Andrew Tridgell 12 years ago
parent
commit
421253e6db
  1. 6
      src/drivers/px4io/px4io.cpp

6
src/drivers/px4io/px4io.cpp

@ -1336,11 +1336,7 @@ PX4IO::ioctl(file *filep, int cmd, unsigned long arg) @@ -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: {

Loading…
Cancel
Save