Copter: don't set takeoff expected in throw mode

especially bad for dropping off a bridge
This commit is contained in:
Andrew Tridgell 2021-05-31 16:31:09 +10:00 committed by Randy Mackay
parent dc9435a88d
commit 77e566c6ed

View File

@ -31,8 +31,11 @@ void Copter::update_ground_effect_detector(void)
// takeoff logic
// if we are armed and haven't yet taken off
if (motors->armed() && ap.land_complete && !gndeffect_state.takeoff_expected) {
if (flightmode->mode_number() == Mode::Number::THROW) {
// throw mode never wants the takeoff expected EKF code
gndeffect_state.takeoff_expected = false;
} else if (motors->armed() && ap.land_complete) {
// if we are armed and haven't yet taken off then we expect an imminent takeoff
gndeffect_state.takeoff_expected = true;
}