Plane: Enforce THR_MIN/THR_MAX in VTOL modes

This commit is contained in:
Ubuntu 16.04 VM 2017-11-20 16:30:46 -07:00 committed by Tom Pittenger
parent f6f40afcda
commit 624aef401d
1 changed files with 2 additions and 1 deletions

View File

@ -378,7 +378,8 @@ void Plane::set_servos_controlled(void)
SRV_Channels::set_output_scaled(SRV_Channel::k_throttle, channel_throttle->get_control_in_zero_dz());
} else if (quadplane.in_vtol_mode()) {
// ask quadplane code for forward throttle
SRV_Channels::set_output_scaled(SRV_Channel::k_throttle, quadplane.forward_throttle_pct());
SRV_Channels::set_output_scaled(SRV_Channel::k_throttle,
constrain_int16(quadplane.forward_throttle_pct(), min_throttle, max_throttle));
}
// suppress throttle when soaring is active