aboutsummaryrefslogtreecommitdiff
path: root/src/modules/vtol_att_control
diff options
context:
space:
mode:
authorMatt Beall <matt.beall@greypointcorp.com>2015-02-25 14:25:28 -0700
committerThomas Gubler <thomasgubler@gmail.com>2015-02-28 15:19:16 +0100
commit220fb19eb74b330bd3e97efc628aeb1bda510dcf (patch)
tree8e301637b76e75bff02aa4c8bac7923c12fc9090 /src/modules/vtol_att_control
parentd7dc3a3ee85e3a3c28d97ef49d53026f254d3650 (diff)
downloadpx4-firmware-220fb19eb74b330bd3e97efc628aeb1bda510dcf.tar.gz
px4-firmware-220fb19eb74b330bd3e97efc628aeb1bda510dcf.tar.bz2
px4-firmware-220fb19eb74b330bd3e97efc628aeb1bda510dcf.zip
Removed actuator_control_mode flags...Using pre-existing flags instead
Diffstat (limited to 'src/modules/vtol_att_control')
-rw-r--r--src/modules/vtol_att_control/vtol_att_control_main.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/modules/vtol_att_control/vtol_att_control_main.cpp b/src/modules/vtol_att_control/vtol_att_control_main.cpp
index 53a08f97a..74e1efd6c 100644
--- a/src/modules/vtol_att_control/vtol_att_control_main.cpp
+++ b/src/modules/vtol_att_control/vtol_att_control_main.cpp
@@ -782,8 +782,9 @@ void VtolAttitudeControl::task_main()
fill_mc_att_control_output();
fill_mc_att_rates_sp();
- /* Only publish if actuator_control mode is not enabled */
- if(!_v_control_mode.flag_control_offboard_actuator_control_enabled)
+ /* Only publish if the proper mode(s) are enabled */
+ if(_v_control_mode.flag_control_attitude_enabled ||
+ _v_control_mode.flag_control_rates_enabled)
{
if (_actuators_0_pub > 0) {
orb_publish(ORB_ID(actuator_controls_0), _actuators_0_pub, &_actuators_out_0);
@@ -817,8 +818,9 @@ void VtolAttitudeControl::task_main()
fill_fw_att_control_output();
fill_fw_att_rates_sp();
- /* Only publish if actuator_control mode is not enabled */
- if(!_v_control_mode.flag_control_offboard_actuator_control_enabled)
+ /* Only publish if the proper mode(s) are enabled */
+ if(_v_control_mode.flag_control_attitude_enabled ||
+ _v_control_mode.flag_control_rates_enabled)
{
if (_actuators_0_pub > 0) {
orb_publish(ORB_ID(actuator_controls_0), _actuators_0_pub, &_actuators_out_0);