diff options
author | philipoe <philipp.oettershagen@mavt.ethz.ch> | 2014-10-29 15:56:31 +0100 |
---|---|---|
committer | philipoe <philipp.oettershagen@mavt.ethz.ch> | 2014-10-29 23:13:51 +0100 |
commit | 47367aeed526e7ca72e9cb7290e745dc0e6e2061 (patch) | |
tree | b64478116298b4badef64f5b2587d5902ee61ee0 | |
parent | 2e33683630002aef5881734c96383685b7e8443f (diff) | |
download | px4-firmware-47367aeed526e7ca72e9cb7290e745dc0e6e2061.tar.gz px4-firmware-47367aeed526e7ca72e9cb7290e745dc0e6e2061.tar.bz2 px4-firmware-47367aeed526e7ca72e9cb7290e745dc0e6e2061.zip |
TECS: Fix bug (underspeed-condition did not have any effect on throttle)
-rw-r--r-- | src/lib/external_lgpl/tecs/tecs.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/external_lgpl/tecs/tecs.cpp b/src/lib/external_lgpl/tecs/tecs.cpp index 6a2a61b04..0ed210cf4 100644 --- a/src/lib/external_lgpl/tecs/tecs.cpp +++ b/src/lib/external_lgpl/tecs/tecs.cpp @@ -299,7 +299,7 @@ void TECS::_update_throttle(float throttle_cruise, const math::Matrix<3,3> &rotM // Calculate throttle demand // If underspeed condition is set, then demand full throttle if (_underspeed) { - _throttle_dem_unc = 1.0f; + _throttle_dem = 1.0f; } else { // Calculate gain scaler from specific energy error to throttle @@ -363,10 +363,10 @@ void TECS::_update_throttle(float throttle_cruise, const math::Matrix<3,3> &rotM } else { _throttle_dem = ff_throttle; } - } - // Constrain throttle demand - _throttle_dem = constrain(_throttle_dem, _THRminf, _THRmaxf); + // Constrain throttle demand + _throttle_dem = constrain(_throttle_dem, _THRminf, _THRmaxf); + } } void TECS::_detect_bad_descent(void) |