diff options
author | Andrew Tridgell <tridge@samba.org> | 2013-04-21 14:28:56 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2013-05-04 19:17:54 +1000 |
commit | 421253e6db6c5e716c84ac505a8caef679ea97ee (patch) | |
tree | fc50aae4126e8c9f5e110251d0cf53c10777de55 /src | |
parent | b06098a5406cf3269a313362b43d7f47b160933b (diff) | |
download | px4-firmware-421253e6db6c5e716c84ac505a8caef679ea97ee.tar.gz px4-firmware-421253e6db6c5e716c84ac505a8caef679ea97ee.tar.bz2 px4-firmware-421253e6db6c5e716c84ac505a8caef679ea97ee.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/drivers/px4io/px4io.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/drivers/px4io/px4io.cpp b/src/drivers/px4io/px4io.cpp index 4c2f1736f..d8b5c51c4 100644 --- a/src/drivers/px4io/px4io.cpp +++ b/src/drivers/px4io/px4io.cpp @@ -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: { |