aboutsummaryrefslogtreecommitdiff
path: root/src/modules/vtol_att_control/vtol_att_control_main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/vtol_att_control/vtol_att_control_main.cpp')
-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);