mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 12:33:33 +08:00
delete RATTITUDE flight mode
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user