aboutsummaryrefslogtreecommitdiff
path: root/src/lib/external_lgpl/tecs/tecs.cpp
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2014-08-31 18:42:43 +0200
committerLorenz Meier <lm@inf.ethz.ch>2014-08-31 18:42:43 +0200
commitb81277a1ef92a26b0bc56c2469dc7933c6c9cd1d (patch)
tree75952370a40d523e1c9ce1d56ab2c3b0d437854b /src/lib/external_lgpl/tecs/tecs.cpp
parent159ba7f3bcc22148c5c8eceac0e950ae53729111 (diff)
parent7a253d50f8da7a6f8176f784c196b85bcae3c8f1 (diff)
downloadpx4-firmware-b81277a1ef92a26b0bc56c2469dc7933c6c9cd1d.tar.gz
px4-firmware-b81277a1ef92a26b0bc56c2469dc7933c6c9cd1d.tar.bz2
px4-firmware-b81277a1ef92a26b0bc56c2469dc7933c6c9cd1d.zip
Merge branch 'sf0x_paranoid' of github.com:PX4/Firmware into swissfang
Diffstat (limited to 'src/lib/external_lgpl/tecs/tecs.cpp')
-rw-r--r--src/lib/external_lgpl/tecs/tecs.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/external_lgpl/tecs/tecs.cpp b/src/lib/external_lgpl/tecs/tecs.cpp
index a57a0481a..d27bf776f 100644
--- a/src/lib/external_lgpl/tecs/tecs.cpp
+++ b/src/lib/external_lgpl/tecs/tecs.cpp
@@ -252,6 +252,11 @@ void TECS::_update_height_demand(float demand, float state)
void TECS::_detect_underspeed(void)
{
+ if (!_detect_underspeed_enabled) {
+ _underspeed = false;
+ return;
+ }
+
if (((_integ5_state < _TASmin * 0.9f) && (_throttle_dem >= _THRmaxf * 0.95f)) || ((_integ3_state < _hgt_dem_adj) && _underspeed)) {
_underspeed = true;