diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2014-04-05 17:12:21 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2014-04-05 17:12:21 +0200 |
commit | e6d48c4f3276af252315118286556b3a000274b6 (patch) | |
tree | b625272738670e5d0720db6c501220f6a7245b1b /src | |
parent | 262485a5e87ccdc8ff645ba45992bdbe13363fab (diff) | |
download | px4-firmware-e6d48c4f3276af252315118286556b3a000274b6.tar.gz px4-firmware-e6d48c4f3276af252315118286556b3a000274b6.tar.bz2 px4-firmware-e6d48c4f3276af252315118286556b3a000274b6.zip |
Fix failsafe assignment in sensors app
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/sensors/sensors.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/sensors/sensors.cpp b/src/modules/sensors/sensors.cpp index c91006262..b171b995d 100644 --- a/src/modules/sensors/sensors.cpp +++ b/src/modules/sensors/sensors.cpp @@ -1309,8 +1309,8 @@ Sensors::rc_poll() } /* check for failsafe */ - if ((rc_input.rc_failsafe) || ((_parameters.rc_fs_thr != 0) && (((rc_input.values[_rc.function[THROTTLE]] < _parameters.min[i]) && (rc_input.values[_rc.function[THROTTLE]] < _parameters.rc_fs_thr)) - || ((rc_input.values[_rc.function[THROTTLE]] > _parameters.max[i]) && (rc_input.values[_rc.function[THROTTLE]] > _parameters.rc_fs_thr))))) { + if ((rc_input.rc_failsafe) || ((_parameters.rc_fs_thr != 0) && (((rc_input.values[_rc.function[THROTTLE]] < _parameters.min[_rc.function[THROTTLE]]) && (rc_input.values[_rc.function[THROTTLE]] < _parameters.rc_fs_thr)) + || ((rc_input.values[_rc.function[THROTTLE]] > _parameters.max[_rc.function[THROTTLE]]) && (rc_input.values[_rc.function[THROTTLE]] > _parameters.rc_fs_thr))))) { /* do not publish manual control setpoints when there are none */ return; } |