VTOL: remove some unsued variables

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer 2022-01-25 17:29:54 +01:00
parent 2b7efeacca
commit 7c5f0121a5
4 changed files with 7 additions and 17 deletions

View File

@ -7,6 +7,6 @@ uint8 VEHICLE_VTOL_STATE_FW = 4
uint64 timestamp # time since system start (microseconds) 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 bool vtol_transition_failsafe # vtol in transition failsafe mode

View File

@ -54,7 +54,6 @@ Standard::Standard(VtolAttitudeControl *attc) :
{ {
_vtol_schedule.flight_mode = vtol_mode::MC_MODE; _vtol_schedule.flight_mode = vtol_mode::MC_MODE;
_vtol_schedule.transition_start = 0; _vtol_schedule.transition_start = 0;
_pusher_active = false;
_mc_roll_weight = 1.0f; _mc_roll_weight = 1.0f;
_mc_pitch_weight = 1.0f; _mc_pitch_weight = 1.0f;

View File

@ -55,10 +55,6 @@ Tailsitter::Tailsitter(VtolAttitudeControl *attc) :
_vtol_schedule.flight_mode = vtol_mode::MC_MODE; _vtol_schedule.flight_mode = vtol_mode::MC_MODE;
_vtol_schedule.transition_start = 0; _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; _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]; _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(); _v_att_sp->timestamp = hrt_absolute_time();
const Eulerf euler_sp(_q_trans_sp); const Eulerf euler_sp(_q_trans_sp);
@ -331,9 +323,9 @@ void Tailsitter::fill_actuator_outputs()
_thrust_setpoint_1->xyz[2] = 0.f; _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_ROLL] = mc_in[actuator_controls_s::INDEX_ROLL];
mc_out[actuator_controls_s::INDEX_PITCH] = mc_in[actuator_controls_s::INDEX_PITCH] * _mc_pitch_weight; 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] * _mc_yaw_weight; mc_out[actuator_controls_s::INDEX_YAW] = mc_in[actuator_controls_s::INDEX_YAW];
if (_vtol_schedule.flight_mode == vtol_mode::FW_MODE) { if (_vtol_schedule.flight_mode == vtol_mode::FW_MODE) {
mc_out[actuator_controls_s::INDEX_THROTTLE] = fw_in[actuator_controls_s::INDEX_THROTTLE]; mc_out[actuator_controls_s::INDEX_THROTTLE] = fw_in[actuator_controls_s::INDEX_THROTTLE];
@ -348,9 +340,9 @@ void Tailsitter::fill_actuator_outputs()
} }
} else { } else {
_torque_setpoint_0->xyz[0] = mc_in[actuator_controls_s::INDEX_ROLL] * _mc_roll_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] * _mc_pitch_weight; _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_yaw_weight; _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]; 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]; _thrust_setpoint_0->xyz[2] = -mc_in[actuator_controls_s::INDEX_THROTTLE];

View File

@ -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 _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_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_pitch_weight = 1.0f; // weight for multicopter attitude controller pitch output
float _mc_yaw_weight = 1.0f; // weight for multicopter attitude controller yaw output float _mc_yaw_weight = 1.0f; // weight for multicopter attitude controller yaw output