mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-18 06:38:29 -04:00
Copter: don't set takeoff expected in throw mode
especially bad for dropping off a bridge
This commit is contained in:
parent
dc9435a88d
commit
77e566c6ed
@ -31,8 +31,11 @@ void Copter::update_ground_effect_detector(void)
|
|||||||
|
|
||||||
// takeoff logic
|
// takeoff logic
|
||||||
|
|
||||||
// if we are armed and haven't yet taken off
|
if (flightmode->mode_number() == Mode::Number::THROW) {
|
||||||
if (motors->armed() && ap.land_complete && !gndeffect_state.takeoff_expected) {
|
// 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;
|
gndeffect_state.takeoff_expected = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user