Browse Source

Copter: don't set takeoff expected in throw mode

especially bad for dropping off a bridge
zr-v5.1
Andrew Tridgell 4 years ago committed by Randy Mackay
parent
commit
77e566c6ed
  1. 7
      ArduCopter/baro_ground_effect.cpp

7
ArduCopter/baro_ground_effect.cpp

@ -31,8 +31,11 @@ void Copter::update_ground_effect_detector(void) @@ -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;
}

Loading…
Cancel
Save