diff options
author | px4dev <px4@purgatory.org> | 2012-12-01 22:55:33 -0800 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2012-12-01 22:55:33 -0800 |
commit | 55e2e18885c7d4b1af2ffe691a61e536a9bfd917 (patch) | |
tree | 84e047ca921900ce3edcc0a6fc6e149cd84343e2 /apps | |
parent | c09ed414fdb61415d6ca94107c66e35a7c5ec403 (diff) | |
parent | f3bd78876b1cb642ae24da7b416c72dae12e68c4 (diff) | |
download | px4-firmware-55e2e18885c7d4b1af2ffe691a61e536a9bfd917.tar.gz px4-firmware-55e2e18885c7d4b1af2ffe691a61e536a9bfd917.tar.bz2 px4-firmware-55e2e18885c7d4b1af2ffe691a61e536a9bfd917.zip |
Merge pull request #73 from PX4/io_arming
Made sure IO and FMU obey the lockdown flag when arming motors
Diffstat (limited to 'apps')
-rw-r--r-- | apps/drivers/px4fmu/fmu.cpp | 4 | ||||
-rw-r--r-- | apps/drivers/px4io/px4io.cpp | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/apps/drivers/px4fmu/fmu.cpp b/apps/drivers/px4fmu/fmu.cpp index 3eb4a9ef2..61dd418f8 100644 --- a/apps/drivers/px4fmu/fmu.cpp +++ b/apps/drivers/px4fmu/fmu.cpp @@ -382,8 +382,8 @@ PX4FMU::task_main() /* get new value */ orb_copy(ORB_ID(actuator_armed), _t_armed, &aa); - /* update PWM servo armed status */ - up_pwm_servo_arm(aa.armed); + /* update PWM servo armed status if armed and not locked down */ + up_pwm_servo_arm(aa.armed && !aa.lockdown); } } diff --git a/apps/drivers/px4io/px4io.cpp b/apps/drivers/px4io/px4io.cpp index 296c541c9..456564ba7 100644 --- a/apps/drivers/px4io/px4io.cpp +++ b/apps/drivers/px4io/px4io.cpp @@ -499,7 +499,8 @@ PX4IO::io_send() // XXX relays - cmd.arm_ok = _armed.armed; + /* armed and not locked down */ + cmd.arm_ok = (_armed.armed && !_armed.lockdown); ret = hx_stream_send(_io_stream, &cmd, sizeof(cmd)); if (ret) |