mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 01:23:34 +08:00
delete RATTITUDE flight mode
This commit is contained in:
@@ -148,8 +148,6 @@ private:
|
||||
|
||||
(ParamFloat<px4::params::MPC_MAN_Y_MAX>) _param_mpc_man_y_max, /**< scaling factor from stick to yaw rate */
|
||||
|
||||
(ParamFloat<px4::params::MC_RATT_TH>) _param_mc_ratt_th,
|
||||
|
||||
/* Stabilized mode params */
|
||||
(ParamFloat<px4::params::MPC_MAN_TILT_MAX>) _param_mpc_man_tilt_max, /**< maximum tilt allowed for manual flight */
|
||||
(ParamFloat<px4::params::MPC_MANTHR_MIN>) _param_mpc_manthr_min, /**< minimum throttle for stabilized */
|
||||
|
||||
@@ -287,15 +287,6 @@ MulticopterAttitudeControl::Run()
|
||||
}
|
||||
}
|
||||
|
||||
/* Check if we are in rattitude mode and the pilot is above the threshold on pitch
|
||||
* or roll (yaw can rotate 360 in normal att control). If both are true don't
|
||||
* even bother running the attitude controllers */
|
||||
if (_v_control_mode.flag_control_rattitude_enabled) {
|
||||
_v_control_mode.flag_control_attitude_enabled =
|
||||
fabsf(_manual_control_setpoint.y) <= _param_mc_ratt_th.get() &&
|
||||
fabsf(_manual_control_setpoint.x) <= _param_mc_ratt_th.get();
|
||||
}
|
||||
|
||||
bool attitude_setpoint_generated = false;
|
||||
|
||||
const bool is_hovering = (_vehicle_type_rotary_wing && !_vtol_in_transition_mode);
|
||||
@@ -338,9 +329,7 @@ MulticopterAttitudeControl::Run()
|
||||
|
||||
// reset yaw setpoint during transitions, tailsitter.cpp generates
|
||||
// attitude setpoint for the transition
|
||||
_reset_yaw_sp = (!attitude_setpoint_generated && !_v_control_mode.flag_control_rattitude_enabled) ||
|
||||
_landed || (_vtol && _vtol_in_transition_mode);
|
||||
|
||||
_reset_yaw_sp = !attitude_setpoint_generated || _landed || (_vtol && _vtol_in_transition_mode);
|
||||
}
|
||||
|
||||
perf_end(_loop_perf);
|
||||
|
||||
@@ -146,20 +146,6 @@ PARAM_DEFINE_FLOAT(MC_PITCHRATE_MAX, 220.0f);
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(MC_YAWRATE_MAX, 200.0f);
|
||||
|
||||
/**
|
||||
* Threshold for Rattitude mode
|
||||
*
|
||||
* Manual input needed in order to override attitude control rate setpoints
|
||||
* and instead pass manual stick inputs as rate setpoints
|
||||
*
|
||||
* @min 0.0
|
||||
* @max 1.0
|
||||
* @decimal 2
|
||||
* @increment 0.01
|
||||
* @group Multicopter Attitude Control
|
||||
*/
|
||||
PARAM_DEFINE_FLOAT(MC_RATT_TH, 0.8f);
|
||||
|
||||
/**
|
||||
* Manual tilt input filter time constant
|
||||
* Setting this parameter to 0 disables the filter
|
||||
|
||||
Reference in New Issue
Block a user