aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2014-06-02 18:28:18 +0200
committerThomas Gubler <thomasgubler@gmail.com>2014-06-02 18:28:18 +0200
commiteb02c6ce4900a3dfe96592219852b2205c5d691d (patch)
tree73636e1de29127cd0a67b213c775a7ec00356db6
parentfecbebc5a6f1b6b1944c4a38278f3eb53358f836 (diff)
downloadpx4-firmware-eb02c6ce4900a3dfe96592219852b2205c5d691d.tar.gz
px4-firmware-eb02c6ce4900a3dfe96592219852b2205c5d691d.tar.bz2
px4-firmware-eb02c6ce4900a3dfe96592219852b2205c5d691d.zip
mtecs: disable underspeed mode in takeoff mode (as the comment says)
-rw-r--r--src/modules/fw_pos_control_l1/mtecs/mTecs.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/fw_pos_control_l1/mtecs/mTecs.cpp b/src/modules/fw_pos_control_l1/mtecs/mTecs.cpp
index 3de51695e..32f9f19ca 100644
--- a/src/modules/fw_pos_control_l1/mtecs/mTecs.cpp
+++ b/src/modules/fw_pos_control_l1/mtecs/mTecs.cpp
@@ -185,8 +185,8 @@ int mTecs::updateFlightPathAngleAcceleration(float flightPathAngle, float flight
(double)energyDistributionRateSp, (double)energyDistributionRate, (double)energyDistributionRateError, (double)energyDistributionRateError2);
}
- /* Check airspeed: if below safe value switch to underspeed mode (if not in takeoff mode) */
- if (mode != TECS_MODE_LAND && airspeed < _airspeedMin.get()) {
+ /* Check airspeed: if below safe value switch to underspeed mode (if not in land or takeoff mode) */
+ if (mode != TECS_MODE_LAND && mode != TECS_MODE_TAKEOFF && airspeed < _airspeedMin.get()) {
mode = TECS_MODE_UNDERSPEED;
}