mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-08 08:53:56 -04:00
Plane: Refactored quadplane's SLT_Transition::active_frwd()
This commit is contained in:
parent
016a81bc14
commit
e9cdc46f55
@ -4374,9 +4374,20 @@ bool SLT_Transition::allow_update_throttle_mix() const
|
|||||||
|
|
||||||
bool SLT_Transition::active_frwd() const
|
bool SLT_Transition::active_frwd() const
|
||||||
{
|
{
|
||||||
return quadplane.assisted_flight && // We need to be in assisted flight...
|
// We need to be in assisted flight...
|
||||||
((transition_state == TRANSITION_AIRSPEED_WAIT) || (transition_state == TRANSITION_TIMER)) // ... and a transition must be active...
|
if (!quadplane.assisted_flight) {
|
||||||
&& !quadplane.in_vtol_airbrake(); // ... but not executing an QPOS_AIRBRAKE maneuver during an automated landing.
|
return false;
|
||||||
|
}
|
||||||
|
// ... and a transition must be active...
|
||||||
|
if (!((transition_state == TRANSITION_AIRSPEED_WAIT) || (transition_state == TRANSITION_TIMER))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// ... but not executing a QPOS_AIRBRAKE maneuver during an automated landing.
|
||||||
|
if (quadplane.in_vtol_airbrake()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user