Plane: account for sprung throttle in VTOL throttle suppression

when RC_OPTIONS has been changed to not check throttle for arming then
treat this like a sprung throttle for quadplane throttle suppression
in auto-throttle modes, and only unsuppress when throttle goes above
trim+dz
This commit is contained in:
Andrew Tridgell 2022-05-14 15:34:43 +10:00
parent 20f641de99
commit a22e181acb
1 changed files with 11 additions and 2 deletions

View File

@ -1793,8 +1793,17 @@ void QuadPlane::update_throttle_suppression(void)
return;
}
// if the users throttle is above zero then allow motors to run
if (!is_zero(plane.get_throttle_input())) {
/* if the users throttle is above zero then allow motors to run
if the user has unset the "check throttle zero when arming"
then the RC controller has a sprung throttle and we should not
consider non-zero throttle to mean that pilot is commanding
takeoff unless in a manual thottle mode
*/
if (!is_zero(plane.get_throttle_input()) &&
(rc().arming_check_throttle() ||
plane.control_mode->is_vtol_man_throttle() ||
plane.channel_throttle->norm_input_dz() > 0)) {
return;
}