forked from Archive/PX4-Autopilot
TECS: fast descend only available if airspeed is available.
This commit is contained in:
parent
29145ed941
commit
042257c33f
|
@ -773,7 +773,8 @@ bool TECS::_checkFastDescend(const float alt_setpoint, const float alt)
|
|||
{
|
||||
bool ret_val{false};
|
||||
|
||||
if ((_fast_descend_alt_err > FLT_EPSILON) && ((alt_setpoint + _fast_descend_alt_err) < alt)) {
|
||||
if (_control_flag.airspeed_enabled && (_fast_descend_alt_err > FLT_EPSILON)
|
||||
&& ((alt_setpoint + _fast_descend_alt_err) < alt)) {
|
||||
ret_val = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -729,6 +729,7 @@ private:
|
|||
TECSControl::Flag _control_flag{
|
||||
.airspeed_enabled = false,
|
||||
.detect_underspeed_enabled = false,
|
||||
.fast_descend = false
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue