Plane: Allow yaw at zero throttle in VTOL descents
This commit is contained in:
parent
d158199a7a
commit
19213d3627
@ -1571,7 +1571,7 @@ float QuadPlane::get_pilot_input_yaw_rate_cds(void) const
|
||||
bool manual_air_mode = plane.control_mode->is_vtol_man_throttle() && (air_mode == AirMode::ON);
|
||||
if (!manual_air_mode &&
|
||||
plane.get_throttle_input() <= 0 && !plane.control_mode->does_auto_throttle() &&
|
||||
plane.arming.get_rudder_arming_type() != AP_Arming::RudderArming::IS_DISABLED) {
|
||||
plane.arming.get_rudder_arming_type() != AP_Arming::RudderArming::IS_DISABLED && !(inertial_nav.get_velocity_z() < -0.5 * get_pilot_velocity_z_max_dn())) {
|
||||
// the user may be trying to disarm
|
||||
return 0;
|
||||
}
|
||||
@ -1604,13 +1604,12 @@ float QuadPlane::get_desired_yaw_rate_cds(void)
|
||||
yaw_cds += desired_auto_yaw_rate_cds();
|
||||
}
|
||||
bool manual_air_mode = plane.control_mode->is_vtol_man_throttle() && (air_mode == AirMode::ON);
|
||||
if (plane.get_throttle_input() <= 0 && !plane.control_mode->does_auto_throttle() && !manual_air_mode) {
|
||||
if (plane.get_throttle_input() <= 0 && !plane.control_mode->does_auto_throttle() && !manual_air_mode && !(inertial_nav.get_velocity_z() < -0.5 * get_pilot_velocity_z_max_dn())) {
|
||||
// the user may be trying to disarm
|
||||
return 0;
|
||||
}
|
||||
// add in pilot input
|
||||
yaw_cds += get_pilot_input_yaw_rate_cds();
|
||||
|
||||
// add in weathervaning
|
||||
yaw_cds += get_weathervane_yaw_rate_cds();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user