Plane: fixed hover learn in quadplanes for THR_MIN>0

petrol quadplanes commonly have THR_MIN>0, and without this change
cannot ever learn the hover throttle
This commit is contained in:
Andrew Tridgell 2020-09-02 21:56:08 +10:00 committed by Peter Barker
parent 7c5a0a6a43
commit e9b8a20312

View File

@ -1975,7 +1975,8 @@ void QuadPlane::update_throttle_hover()
}
// do not update if quadplane forward motor is running (wing may be generating lift)
if (!is_tailsitter() && (SRV_Channels::get_output_scaled(SRV_Channel::k_throttle) != 0)) {
// we use the THR_MIN value to account for petrol motors idling at THR_MIN
if (!is_tailsitter() && (SRV_Channels::get_output_scaled(SRV_Channel::k_throttle) > MAX(0,plane.aparm.throttle_min+10))) {
return;
}