Revert "vtol_att_control: update parameter strings to class enum"

This reverts commit 5351f886ec.
This commit is contained in:
Daniel Agar 2019-10-03 11:28:51 -04:00
parent a5895e5a99
commit f885d2274a
No known key found for this signature in database
GPG Key ID: FD3CBA98017A69DE
5 changed files with 37 additions and 45 deletions

View File

@ -78,7 +78,7 @@ px4_add_board(
navigator
sensors
vmount
#vtol_att_control
vtol_att_control
#airspeed_selector
SYSTEMCMDS

View File

@ -46,8 +46,6 @@
#include <float.h>
#include <px4_param.h>
using namespace matrix;
Standard::Standard(VtolAttitudeControl *attc) :
@ -62,13 +60,13 @@ Standard::Standard(VtolAttitudeControl *attc) :
_mc_yaw_weight = 1.0f;
_mc_throttle_weight = 1.0f;
_params_handles_standard.pusher_ramp_dt = param_handle(px4::params::VT_PSHER_RMP_DT);
_params_handles_standard.back_trans_ramp = param_handle(px4::params::VT_B_TRANS_RAMP);
_params_handles_standard.down_pitch_max = param_handle(px4::params::VT_DWN_PITCH_MAX);
_params_handles_standard.forward_thrust_scale = param_handle(px4::params::VT_FWD_THRUST_SC);
_params_handles_standard.pitch_setpoint_offset = param_handle(px4::params::FW_PSP_OFF);
_params_handles_standard.reverse_output = param_handle(px4::params::VT_B_REV_OUT);
_params_handles_standard.reverse_delay = param_handle(px4::params::VT_B_REV_DEL);
_params_handles_standard.pusher_ramp_dt = param_find("VT_PSHER_RMP_DT");
_params_handles_standard.back_trans_ramp = param_find("VT_B_TRANS_RAMP");
_params_handles_standard.down_pitch_max = param_find("VT_DWN_PITCH_MAX");
_params_handles_standard.forward_thrust_scale = param_find("VT_FWD_THRUST_SC");
_params_handles_standard.pitch_setpoint_offset = param_find("FW_PSP_OFF");
_params_handles_standard.reverse_output = param_find("VT_B_REV_OUT");
_params_handles_standard.reverse_delay = param_find("VT_B_REV_DEL");
}
void

View File

@ -42,8 +42,6 @@
#include "tailsitter.h"
#include "vtol_att_control_main.h"
#include <px4_param.h>
#define ARSP_YAW_CTRL_DISABLE 4.0f // airspeed at which we stop controlling yaw during a front transition
#define THROTTLE_TRANSITION_MAX 0.25f // maximum added thrust above last value in transition
#define PITCH_TRANSITION_FRONT_P1 -1.1f // pitch angle to switch to TRANSITION_P2
@ -63,8 +61,8 @@ Tailsitter::Tailsitter(VtolAttitudeControl *attc) :
_flag_was_in_trans_mode = false;
_params_handles_tailsitter.front_trans_dur_p2 = param_handle(px4::params::VT_TRANS_P2_DUR);
_params_handles_tailsitter.fw_pitch_sp_offset = param_handle(px4::params::FW_PSP_OFF);
_params_handles_tailsitter.front_trans_dur_p2 = param_find("VT_TRANS_P2_DUR");
_params_handles_tailsitter.fw_pitch_sp_offset = param_find("FW_PSP_OFF");
}
void

View File

@ -42,8 +42,6 @@
#include "tiltrotor.h"
#include "vtol_att_control_main.h"
#include <px4_param.h>
#define ARSP_YAW_CTRL_DISABLE 7.0f // airspeed at which we stop controlling yaw during a front transition
Tiltrotor::Tiltrotor(VtolAttitudeControl *attc) :
@ -58,10 +56,10 @@ Tiltrotor::Tiltrotor(VtolAttitudeControl *attc) :
_flag_was_in_trans_mode = false;
_params_handles_tiltrotor.tilt_mc = param_handle(px4::params::VT_TILT_MC);
_params_handles_tiltrotor.tilt_transition = param_handle(px4::params::VT_TILT_TRANS);
_params_handles_tiltrotor.tilt_fw = param_handle(px4::params::VT_TILT_FW);
_params_handles_tiltrotor.front_trans_dur_p2 = param_handle(px4::params::VT_TRANS_P2_DUR);
_params_handles_tiltrotor.tilt_mc = param_find("VT_TILT_MC");
_params_handles_tiltrotor.tilt_transition = param_find("VT_TILT_TRANS");
_params_handles_tiltrotor.tilt_fw = param_find("VT_TILT_FW");
_params_handles_tiltrotor.front_trans_dur_p2 = param_find("VT_TRANS_P2_DUR");
}
void

View File

@ -51,8 +51,6 @@
#include <matrix/matrix/math.hpp>
#include <uORB/PublicationQueued.hpp>
#include <px4_param.h>
using namespace matrix;
VtolAttitudeControl::VtolAttitudeControl() :
@ -64,30 +62,30 @@ VtolAttitudeControl::VtolAttitudeControl() :
_params.idle_pwm_mc = PWM_DEFAULT_MIN;
_params.vtol_motor_id = 0;
_params_handles.idle_pwm_mc = param_handle(px4::params::VT_IDLE_PWM_MC);
_params_handles.vtol_motor_id = param_handle(px4::params::VT_MOT_ID);
_params_handles.vtol_fw_permanent_stab = param_handle(px4::params::VT_FW_PERM_STAB);
_params_handles.vtol_type = param_handle(px4::params::VT_TYPE);
_params_handles.elevons_mc_lock = param_handle(px4::params::VT_ELEV_MC_LOCK);
_params_handles.fw_min_alt = param_handle(px4::params::VT_FW_MIN_ALT);
_params_handles.fw_alt_err = param_handle(px4::params::VT_FW_ALT_ERR);
_params_handles.fw_qc_max_pitch = param_handle(px4::params::VT_FW_QC_P);
_params_handles.fw_qc_max_roll = param_handle(px4::params::VT_FW_QC_R);
_params_handles.front_trans_time_openloop = param_handle(px4::params::VT_F_TR_OL_TM);
_params_handles.front_trans_time_min = param_handle(px4::params::VT_TRANS_MIN_TM);
_params_handles.idle_pwm_mc = param_find("VT_IDLE_PWM_MC");
_params_handles.vtol_motor_id = param_find("VT_MOT_ID");
_params_handles.vtol_fw_permanent_stab = param_find("VT_FW_PERM_STAB");
_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");
_params_handles.fw_alt_err = param_find("VT_FW_ALT_ERR");
_params_handles.fw_qc_max_pitch = param_find("VT_FW_QC_P");
_params_handles.fw_qc_max_roll = param_find("VT_FW_QC_R");
_params_handles.front_trans_time_openloop = param_find("VT_F_TR_OL_TM");
_params_handles.front_trans_time_min = param_find("VT_TRANS_MIN_TM");
_params_handles.front_trans_duration = param_handle(px4::params::VT_F_TRANS_DUR);
_params_handles.back_trans_duration = param_handle(px4::params::VT_B_TRANS_DUR);
_params_handles.transition_airspeed = param_handle(px4::params::VT_ARSP_TRANS);
_params_handles.front_trans_throttle = param_handle(px4::params::VT_F_TRANS_THR);
_params_handles.back_trans_throttle = param_handle(px4::params::VT_B_TRANS_THR);
_params_handles.airspeed_blend = param_handle(px4::params::VT_ARSP_BLEND);
_params_handles.airspeed_mode = param_handle(px4::params::FW_ARSP_MODE);
_params_handles.front_trans_timeout = param_handle(px4::params::VT_TRANS_TIMEOUT);
_params_handles.mpc_xy_cruise = param_handle(px4::params::MPC_XY_CRUISE);
_params_handles.fw_motors_off = param_handle(px4::params::VT_FW_MOT_OFFID);
_params_handles.diff_thrust = param_handle(px4::params::VT_FW_DIFTHR_EN);
_params_handles.diff_thrust_scale = param_handle(px4::params::VT_FW_DIFTHR_SC);
_params_handles.front_trans_duration = param_find("VT_F_TRANS_DUR");
_params_handles.back_trans_duration = param_find("VT_B_TRANS_DUR");
_params_handles.transition_airspeed = param_find("VT_ARSP_TRANS");
_params_handles.front_trans_throttle = param_find("VT_F_TRANS_THR");
_params_handles.back_trans_throttle = param_find("VT_B_TRANS_THR");
_params_handles.airspeed_blend = param_find("VT_ARSP_BLEND");
_params_handles.airspeed_mode = param_find("FW_ARSP_MODE");
_params_handles.front_trans_timeout = param_find("VT_TRANS_TIMEOUT");
_params_handles.mpc_xy_cruise = param_find("MPC_XY_CRUISE");
_params_handles.fw_motors_off = param_find("VT_FW_MOT_OFFID");
_params_handles.diff_thrust = param_find("VT_FW_DIFTHR_EN");
_params_handles.diff_thrust_scale = param_find("VT_FW_DIFTHR_SC");
/* fetch initial parameter values */
parameters_update();