diff --git a/msg/vtol_vehicle_status.msg b/msg/vtol_vehicle_status.msg index 2971a25ab2..80c424e7a4 100644 --- a/msg/vtol_vehicle_status.msg +++ b/msg/vtol_vehicle_status.msg @@ -7,6 +7,6 @@ uint8 VEHICLE_VTOL_STATE_FW = 4 uint64 timestamp # time since system start (microseconds) -uint8 vehicle_vtol_state # current state of the vtol, see VEHICLE_VTOL_STATE +uint8 vehicle_vtol_state # current state of the vtol, see VEHICLE_VTOL_STATE bool vtol_transition_failsafe # vtol in transition failsafe mode diff --git a/src/modules/vtol_att_control/standard.cpp b/src/modules/vtol_att_control/standard.cpp index b56d7b979a..a6c86b48f1 100644 --- a/src/modules/vtol_att_control/standard.cpp +++ b/src/modules/vtol_att_control/standard.cpp @@ -54,7 +54,6 @@ Standard::Standard(VtolAttitudeControl *attc) : { _vtol_schedule.flight_mode = vtol_mode::MC_MODE; _vtol_schedule.transition_start = 0; - _pusher_active = false; _mc_roll_weight = 1.0f; _mc_pitch_weight = 1.0f; diff --git a/src/modules/vtol_att_control/tailsitter.cpp b/src/modules/vtol_att_control/tailsitter.cpp index c04f37502d..44f50bb53a 100644 --- a/src/modules/vtol_att_control/tailsitter.cpp +++ b/src/modules/vtol_att_control/tailsitter.cpp @@ -55,10 +55,6 @@ Tailsitter::Tailsitter(VtolAttitudeControl *attc) : _vtol_schedule.flight_mode = vtol_mode::MC_MODE; _vtol_schedule.transition_start = 0; - _mc_roll_weight = 1.0f; - _mc_pitch_weight = 1.0f; - _mc_yaw_weight = 1.0f; - _flag_was_in_trans_mode = false; } @@ -269,10 +265,6 @@ void Tailsitter::update_transition_state() _v_att_sp->thrust_body[2] = _mc_virtual_att_sp->thrust_body[2]; - _mc_roll_weight = 1.0f; - _mc_pitch_weight = 1.0f; - _mc_yaw_weight = 1.0f; - _v_att_sp->timestamp = hrt_absolute_time(); const Eulerf euler_sp(_q_trans_sp); @@ -331,9 +323,9 @@ void Tailsitter::fill_actuator_outputs() _thrust_setpoint_1->xyz[2] = 0.f; - mc_out[actuator_controls_s::INDEX_ROLL] = mc_in[actuator_controls_s::INDEX_ROLL] * _mc_roll_weight; - mc_out[actuator_controls_s::INDEX_PITCH] = mc_in[actuator_controls_s::INDEX_PITCH] * _mc_pitch_weight; - mc_out[actuator_controls_s::INDEX_YAW] = mc_in[actuator_controls_s::INDEX_YAW] * _mc_yaw_weight; + mc_out[actuator_controls_s::INDEX_ROLL] = mc_in[actuator_controls_s::INDEX_ROLL]; + mc_out[actuator_controls_s::INDEX_PITCH] = mc_in[actuator_controls_s::INDEX_PITCH]; + mc_out[actuator_controls_s::INDEX_YAW] = mc_in[actuator_controls_s::INDEX_YAW]; if (_vtol_schedule.flight_mode == vtol_mode::FW_MODE) { mc_out[actuator_controls_s::INDEX_THROTTLE] = fw_in[actuator_controls_s::INDEX_THROTTLE]; @@ -348,9 +340,9 @@ void Tailsitter::fill_actuator_outputs() } } else { - _torque_setpoint_0->xyz[0] = mc_in[actuator_controls_s::INDEX_ROLL] * _mc_roll_weight; - _torque_setpoint_0->xyz[1] = mc_in[actuator_controls_s::INDEX_PITCH] * _mc_pitch_weight; - _torque_setpoint_0->xyz[2] = mc_in[actuator_controls_s::INDEX_YAW] * _mc_yaw_weight; + _torque_setpoint_0->xyz[0] = mc_in[actuator_controls_s::INDEX_ROLL]; + _torque_setpoint_0->xyz[1] = mc_in[actuator_controls_s::INDEX_PITCH]; + _torque_setpoint_0->xyz[2] = mc_in[actuator_controls_s::INDEX_YAW]; mc_out[actuator_controls_s::INDEX_THROTTLE] = mc_in[actuator_controls_s::INDEX_THROTTLE]; _thrust_setpoint_0->xyz[2] = -mc_in[actuator_controls_s::INDEX_THROTTLE]; diff --git a/src/modules/vtol_att_control/vtol_type.h b/src/modules/vtol_att_control/vtol_type.h index 8c66253aba..0e783d9b77 100644 --- a/src/modules/vtol_att_control/vtol_type.h +++ b/src/modules/vtol_att_control/vtol_type.h @@ -214,7 +214,6 @@ protected: bool _flag_idle_mc = false; //false = "idle is set for fixed wing mode"; true = "idle is set for multicopter mode" - bool _pusher_active = false; float _mc_roll_weight = 1.0f; // weight for multicopter attitude controller roll output float _mc_pitch_weight = 1.0f; // weight for multicopter attitude controller pitch output float _mc_yaw_weight = 1.0f; // weight for multicopter attitude controller yaw output