diff options
author | Andrew Tridgell <tridge@samba.org> | 2013-05-16 16:21:33 +1000 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-05-16 08:39:24 +0200 |
commit | fa816d0fd65da461fd5bf8803cf00caebaf23c5c (patch) | |
tree | 3b705d66f9d2253d30a602ee6b4e54d34e8a7bdc /src/drivers/px4io | |
parent | d02f5c5505aba9c13a979d1d170d98ef17ca99ca (diff) | |
download | px4-firmware-fa816d0fd65da461fd5bf8803cf00caebaf23c5c.tar.gz px4-firmware-fa816d0fd65da461fd5bf8803cf00caebaf23c5c.tar.bz2 px4-firmware-fa816d0fd65da461fd5bf8803cf00caebaf23c5c.zip |
arming: added PWM_SERVO_SET_ARM_OK and PWM_SERVO_CLEAR_ARM_OK
these new ioctls allow for the flight code to tell the IO board that
arming can proceed
Diffstat (limited to 'src/drivers/px4io')
-rw-r--r-- | src/drivers/px4io/px4io.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/drivers/px4io/px4io.cpp b/src/drivers/px4io/px4io.cpp index 3006cf885..a40142792 100644 --- a/src/drivers/px4io/px4io.cpp +++ b/src/drivers/px4io/px4io.cpp @@ -1358,6 +1358,16 @@ PX4IO::ioctl(file *filep, int cmd, unsigned long arg) ret = io_reg_modify(PX4IO_PAGE_SETUP, PX4IO_P_SETUP_ARMING, 0, PX4IO_P_SETUP_ARMING_FMU_ARMED); break; + case PWM_SERVO_SET_ARM_OK: + /* set the 'OK to arm' bit */ + ret = io_reg_modify(PX4IO_PAGE_SETUP, PX4IO_P_SETUP_ARMING, 0, PX4IO_P_SETUP_ARMING_IO_ARM_OK); + break; + + case PWM_SERVO_CLEAR_ARM_OK: + /* clear the 'OK to arm' bit */ + ret = io_reg_modify(PX4IO_PAGE_SETUP, PX4IO_P_SETUP_ARMING, PX4IO_P_SETUP_ARMING_IO_ARM_OK, 0); + break; + case PWM_SERVO_DISARM: /* clear the 'armed' bit */ ret = io_reg_modify(PX4IO_PAGE_SETUP, PX4IO_P_SETUP_ARMING, PX4IO_P_SETUP_ARMING_FMU_ARMED, 0); |