mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-13 20:00:34 +08:00
multiplatform port of #1741: move params from att control to pos control
This commit is contained in:
@@ -89,9 +89,6 @@ MulticopterAttitudeControl::MulticopterAttitudeControl() :
|
||||
.yaw_rate_d = px4::ParameterFloat("MC_YAWRATE_D", PARAM_MC_YAWRATE_D_DEFAULT),
|
||||
.yaw_ff = px4::ParameterFloat("MC_YAW_FF", PARAM_MC_YAW_FF_DEFAULT),
|
||||
.yaw_rate_max = px4::ParameterFloat("MC_YAWRATE_MAX", PARAM_MC_YAWRATE_MAX_DEFAULT),
|
||||
.man_roll_max = px4::ParameterFloat("MC_MAN_R_MAX", PARAM_MC_MAN_R_MAX_DEFAULT),
|
||||
.man_pitch_max = px4::ParameterFloat("MC_MAN_P_MAX", PARAM_MC_MAN_P_MAX_DEFAULT),
|
||||
.man_yaw_max = px4::ParameterFloat("MC_MAN_Y_MAX", PARAM_MC_MAN_Y_MAX_DEFAULT),
|
||||
.acro_roll_max = px4::ParameterFloat("MC_ACRO_R_MAX", PARAM_MC_ACRO_R_MAX_DEFAULT),
|
||||
.acro_pitch_max = px4::ParameterFloat("MC_ACRO_P_MAX", PARAM_MC_ACRO_P_MAX_DEFAULT),
|
||||
.acro_yaw_max = px4::ParameterFloat("MC_ACRO_Y_MAX", PARAM_MC_ACRO_Y_MAX_DEFAULT)
|
||||
@@ -146,11 +143,6 @@ MulticopterAttitudeControl::parameters_update()
|
||||
_params.yaw_ff = _params_handles.yaw_ff.update();
|
||||
_params.yaw_rate_max = math::radians(_params_handles.yaw_rate_max.update());
|
||||
|
||||
/* manual control scale */
|
||||
_params.man_roll_max = math::radians(_params_handles.man_roll_max.update());
|
||||
_params.man_pitch_max = math::radians(_params_handles.man_pitch_max.update());
|
||||
_params.man_yaw_max = math::radians(_params_handles.man_yaw_max.update());
|
||||
|
||||
/* acro control scale */
|
||||
_params.acro_rate_max(0) = math::radians(_params_handles.acro_roll_max.update());
|
||||
_params.acro_rate_max(1) = math::radians(_params_handles.acro_pitch_max.update());
|
||||
|
||||
@@ -110,9 +110,6 @@ private:
|
||||
px4::ParameterFloat yaw_ff;
|
||||
px4::ParameterFloat yaw_rate_max;
|
||||
|
||||
px4::ParameterFloat man_roll_max;
|
||||
px4::ParameterFloat man_pitch_max;
|
||||
px4::ParameterFloat man_yaw_max;
|
||||
px4::ParameterFloat acro_roll_max;
|
||||
px4::ParameterFloat acro_pitch_max;
|
||||
px4::ParameterFloat acro_yaw_max;
|
||||
|
||||
@@ -66,9 +66,6 @@ MulticopterAttitudeControlBase::MulticopterAttitudeControlBase() :
|
||||
_params.rate_d.zero();
|
||||
_params.yaw_ff = 0.0f;
|
||||
_params.yaw_rate_max = 0.0f;
|
||||
_params.man_roll_max = 0.0f;
|
||||
_params.man_pitch_max = 0.0f;
|
||||
_params.man_yaw_max = 0.0f;
|
||||
_params.acro_rate_max.zero();
|
||||
|
||||
_rates_prev.zero();
|
||||
|
||||
@@ -119,9 +119,6 @@ protected:
|
||||
float yaw_ff; /**< yaw control feed-forward */
|
||||
float yaw_rate_max; /**< max yaw rate */
|
||||
|
||||
float man_roll_max;
|
||||
float man_pitch_max;
|
||||
float man_yaw_max;
|
||||
math::Vector<3> acro_rate_max; /**< max attitude rates in acro mode */
|
||||
|
||||
int32_t autostart_id;
|
||||
|
||||
@@ -189,35 +189,6 @@ PX4_PARAM_DEFINE_FLOAT(MC_YAW_FF);
|
||||
*/
|
||||
PX4_PARAM_DEFINE_FLOAT(MC_YAWRATE_MAX);
|
||||
|
||||
/**
|
||||
* Max manual roll
|
||||
*
|
||||
* @unit deg
|
||||
* @min 0.0
|
||||
* @max 90.0
|
||||
* @group Multicopter Attitude Control
|
||||
*/
|
||||
PX4_PARAM_DEFINE_FLOAT(MC_MAN_R_MAX);
|
||||
|
||||
/**
|
||||
* Max manual pitch
|
||||
*
|
||||
* @unit deg
|
||||
* @min 0.0
|
||||
* @max 90.0
|
||||
* @group Multicopter Attitude Control
|
||||
*/
|
||||
PX4_PARAM_DEFINE_FLOAT(MC_MAN_P_MAX);
|
||||
|
||||
/**
|
||||
* Max manual yaw rate
|
||||
*
|
||||
* @unit deg/s
|
||||
* @min 0.0
|
||||
* @group Multicopter Attitude Control
|
||||
*/
|
||||
PX4_PARAM_DEFINE_FLOAT(MC_MAN_Y_MAX);
|
||||
|
||||
/**
|
||||
* Max acro roll rate
|
||||
*
|
||||
|
||||
@@ -57,9 +57,6 @@
|
||||
#define PARAM_MC_YAWRATE_D_DEFAULT 0.0f
|
||||
#define PARAM_MC_YAW_FF_DEFAULT 0.5f
|
||||
#define PARAM_MC_YAWRATE_MAX_DEFAULT 120.0f
|
||||
#define PARAM_MC_MAN_R_MAX_DEFAULT 35.0f
|
||||
#define PARAM_MC_MAN_P_MAX_DEFAULT 35.0f
|
||||
#define PARAM_MC_MAN_Y_MAX_DEFAULT 120.0f
|
||||
#define PARAM_MC_ACRO_R_MAX_DEFAULT 35.0f
|
||||
#define PARAM_MC_ACRO_P_MAX_DEFAULT 35.0f
|
||||
#define PARAM_MC_ACRO_Y_MAX_DEFAULT 120.0f
|
||||
|
||||
Reference in New Issue
Block a user