Plane: reset baro_takeoff_alt while disarmed
This commit is contained in:
parent
0406b28abd
commit
4a35159cba
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user