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 92a591de51..59a3551a68 100644 --- a/src/modules/vtol_att_control/vtol_att_control_main.cpp +++ b/src/modules/vtol_att_control/vtol_att_control_main.cpp @@ -43,7 +43,6 @@ * @author Thomas Gubler * */ - #include "vtol_att_control_main.h" namespace VTOL_att_control @@ -493,13 +492,11 @@ void VtolAttitudeControl::task_main() // vehicle is in rotary wing mode _vtol_vehicle_status.vtol_in_rw_mode = true; - _vtol_type->update_mc_state(); - // got data from mc attitude controller if (fds[0].revents & POLLIN) { orb_copy(ORB_ID(actuator_controls_virtual_mc), _actuator_inputs_mc, &_actuators_mc_in); - _vtol_type->process_mc_data(); + _vtol_type->update_mc_state(); fill_mc_att_rates_sp(); } @@ -507,14 +504,12 @@ void VtolAttitudeControl::task_main() // vehicle is in fw mode _vtol_vehicle_status.vtol_in_rw_mode = false; - _vtol_type->update_fw_state(); - // got data from fw attitude controller if (fds[1].revents & POLLIN) { orb_copy(ORB_ID(actuator_controls_virtual_fw), _actuator_inputs_fw, &_actuators_fw_in); vehicle_manual_poll(); - _vtol_type->process_fw_data(); + _vtol_type->update_fw_state(); fill_fw_att_rates_sp(); } @@ -534,8 +529,6 @@ void VtolAttitudeControl::task_main() // update transition state if got any new data if (got_new_data) { _vtol_type->update_transition_state(); - - _vtol_type->process_mc_data(); fill_mc_att_rates_sp(); } @@ -544,6 +537,7 @@ void VtolAttitudeControl::task_main() _vtol_type->update_external_state(); } + _vtol_type->fill_actuator_outputs(); /* Only publish if the proper mode(s) are enabled */ if(_v_control_mode.flag_control_attitude_enabled ||