mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-25 17:25:18 +03:00
Prevent unexpected takeoff in RTH LANDED state.
This commit is contained in:
parent
7c24e68e11
commit
3701c67a4b
1 changed files with 8 additions and 0 deletions
|
@ -1312,6 +1312,10 @@ static navigationFSMEvent_t navOnEnteringState_NAV_STATE_RTH_FINISHED(navigation
|
||||||
// Stay in this state
|
// Stay in this state
|
||||||
UNUSED(previousState);
|
UNUSED(previousState);
|
||||||
updateClimbRateToAltitudeController(-0.3f * navConfig()->general.land_descent_rate, ROC_TO_ALT_NORMAL); // FIXME
|
updateClimbRateToAltitudeController(-0.3f * navConfig()->general.land_descent_rate, ROC_TO_ALT_NORMAL); // FIXME
|
||||||
|
|
||||||
|
// Prevent I-terms growing when already landed
|
||||||
|
pidResetErrorAccumulators();
|
||||||
|
|
||||||
return NAV_FSM_EVENT_NONE;
|
return NAV_FSM_EVENT_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1477,6 +1481,10 @@ static navigationFSMEvent_t navOnEnteringState_NAV_STATE_EMERGENCY_LANDING_FINIS
|
||||||
{
|
{
|
||||||
// TODO:
|
// TODO:
|
||||||
UNUSED(previousState);
|
UNUSED(previousState);
|
||||||
|
|
||||||
|
// Prevent I-terms growing when already landed
|
||||||
|
pidResetErrorAccumulators();
|
||||||
|
|
||||||
return NAV_FSM_EVENT_SUCCESS;
|
return NAV_FSM_EVENT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue