Plane: reset baro_takeoff_alt while disarmed

This commit is contained in:
Tom Pittenger 2020-04-24 14:29:42 -07:00 committed by Andrew Tridgell
parent 0406b28abd
commit 4a35159cba

View File

@ -18,6 +18,7 @@ bool Plane::auto_takeoff_check(void)
// reset all takeoff state if disarmed
if (!hal.util->get_soft_armed()) {
memset(&takeoff_state, 0, sizeof(takeoff_state));
auto_state.baro_takeoff_alt = barometer.get_altitude();
return false;
}