From 2ce8b6a984184b9fbb53e96b3ce4a11894857eba Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Wed, 7 Mar 2018 09:08:59 -0500 Subject: [PATCH] delete VT_FW_PITCH_TRIM parameter (#9014) --- src/modules/vtol_att_control/tailsitter.cpp | 2 +- src/modules/vtol_att_control/tiltrotor.cpp | 2 +- .../vtol_att_control/vtol_att_control_main.cpp | 5 ----- .../vtol_att_control/vtol_att_control_main.h | 1 - .../vtol_att_control/vtol_att_control_params.c | 13 ------------- src/modules/vtol_att_control/vtol_type.h | 1 - 6 files changed, 2 insertions(+), 22 deletions(-) diff --git a/src/modules/vtol_att_control/tailsitter.cpp b/src/modules/vtol_att_control/tailsitter.cpp index 3aa33c39fb..7a73bc23d1 100644 --- a/src/modules/vtol_att_control/tailsitter.cpp +++ b/src/modules/vtol_att_control/tailsitter.cpp @@ -316,7 +316,7 @@ void Tailsitter::fill_actuator_outputs() _actuators_out_1->control[actuator_controls_s::INDEX_ROLL] = -_actuators_fw_in->control[actuator_controls_s::INDEX_ROLL]; // roll elevon _actuators_out_1->control[actuator_controls_s::INDEX_PITCH] = - _actuators_fw_in->control[actuator_controls_s::INDEX_PITCH] + _params->fw_pitch_trim; // pitch elevon + _actuators_fw_in->control[actuator_controls_s::INDEX_PITCH]; // pitch elevon _actuators_out_1->control[actuator_controls_s::INDEX_YAW] = _actuators_fw_in->control[actuator_controls_s::INDEX_YAW]; // yaw _actuators_out_1->control[actuator_controls_s::INDEX_THROTTLE] = diff --git a/src/modules/vtol_att_control/tiltrotor.cpp b/src/modules/vtol_att_control/tiltrotor.cpp index 84621ca58f..73322d7a2a 100644 --- a/src/modules/vtol_att_control/tiltrotor.cpp +++ b/src/modules/vtol_att_control/tiltrotor.cpp @@ -409,7 +409,7 @@ void Tiltrotor::fill_actuator_outputs() _actuators_out_1->control[actuator_controls_s::INDEX_ROLL] = -_actuators_fw_in->control[actuator_controls_s::INDEX_ROLL]; _actuators_out_1->control[actuator_controls_s::INDEX_PITCH] = - (_actuators_fw_in->control[actuator_controls_s::INDEX_PITCH] + _params->fw_pitch_trim); + (_actuators_fw_in->control[actuator_controls_s::INDEX_PITCH]); _actuators_out_1->control[actuator_controls_s::INDEX_YAW] = _actuators_fw_in->control[actuator_controls_s::INDEX_YAW]; // yaw _actuators_out_1->control[4] = _tilt_control; 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 d19370eb3c..b4c9c9cece 100644 --- a/src/modules/vtol_att_control/vtol_att_control_main.cpp +++ b/src/modules/vtol_att_control/vtol_att_control_main.cpp @@ -67,7 +67,6 @@ VtolAttitudeControl::VtolAttitudeControl() _params_handles.idle_pwm_mc = param_find("VT_IDLE_PWM_MC"); _params_handles.vtol_motor_count = param_find("VT_MOT_COUNT"); _params_handles.vtol_fw_permanent_stab = param_find("VT_FW_PERM_STAB"); - _params_handles.fw_pitch_trim = param_find("VT_FW_PITCH_TRIM"); _params_handles.vtol_type = param_find("VT_TYPE"); _params_handles.elevons_mc_lock = param_find("VT_ELEV_MC_LOCK"); _params_handles.fw_min_alt = param_find("VT_FW_MIN_ALT"); @@ -450,10 +449,6 @@ VtolAttitudeControl::parameters_update() param_get(_params_handles.vtol_fw_permanent_stab, &l); _vtol_vehicle_status.fw_permanent_stab = (l == 1); - /* vtol pitch trim for fw mode */ - param_get(_params_handles.fw_pitch_trim, &v); - _params.fw_pitch_trim = v; - param_get(_params_handles.vtol_type, &l); _params.vtol_type = l; diff --git a/src/modules/vtol_att_control/vtol_att_control_main.h b/src/modules/vtol_att_control/vtol_att_control_main.h index e98a15a520..29ea822e0a 100644 --- a/src/modules/vtol_att_control/vtol_att_control_main.h +++ b/src/modules/vtol_att_control/vtol_att_control_main.h @@ -180,7 +180,6 @@ private: param_t idle_pwm_mc; param_t vtol_motor_count; param_t vtol_fw_permanent_stab; - param_t fw_pitch_trim; param_t vtol_type; param_t elevons_mc_lock; param_t fw_min_alt; diff --git a/src/modules/vtol_att_control/vtol_att_control_params.c b/src/modules/vtol_att_control/vtol_att_control_params.c index 209870a775..a9cefd6cd1 100644 --- a/src/modules/vtol_att_control/vtol_att_control_params.c +++ b/src/modules/vtol_att_control/vtol_att_control_params.c @@ -73,19 +73,6 @@ PARAM_DEFINE_INT32(VT_IDLE_PWM_MC, 900); */ PARAM_DEFINE_INT32(VT_FW_PERM_STAB, 0); -/** - * Fixed wing pitch trim - * - * This parameter allows to adjust the neutral elevon position in fixed wing mode. - * - * @min -1.0 - * @max 1.0 - * @increment 0.01 - * @decimal 2 - * @group VTOL Attitude Control - */ -PARAM_DEFINE_FLOAT(VT_FW_PITCH_TRIM, 0.0f); - /** * VTOL Type (Tailsitter=0, Tiltrotor=1, Standard=2) * diff --git a/src/modules/vtol_att_control/vtol_type.h b/src/modules/vtol_att_control/vtol_type.h index 04b2f3aa77..5d358e277b 100644 --- a/src/modules/vtol_att_control/vtol_type.h +++ b/src/modules/vtol_att_control/vtol_type.h @@ -49,7 +49,6 @@ struct Params { int32_t idle_pwm_mc; // pwm value for idle in mc mode int32_t vtol_motor_count; // number of motors - float fw_pitch_trim; // trim for neutral elevon position in fw mode int32_t vtol_type; bool elevons_mc_lock; // lock elevons in multicopter mode float fw_min_alt; // minimum relative altitude for FW mode (QuadChute)