TECS: fast descend only available if airspeed is available.

This commit is contained in:
Konrad 2024-01-12 11:50:17 +01:00
parent 29145ed941
commit 042257c33f
2 changed files with 3 additions and 1 deletions

View File

@ -773,7 +773,8 @@ bool TECS::_checkFastDescend(const float alt_setpoint, const float alt)
{ {
bool ret_val{false}; 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; ret_val = true;
} }

View File

@ -729,6 +729,7 @@ private:
TECSControl::Flag _control_flag{ TECSControl::Flag _control_flag{
.airspeed_enabled = false, .airspeed_enabled = false,
.detect_underspeed_enabled = false, .detect_underspeed_enabled = false,
.fast_descend = false
}; };
/** /**