diff options
author | Anton Babushkin <anton.babushkin@me.com> | 2014-04-03 23:47:09 +0400 |
---|---|---|
committer | Anton Babushkin <anton.babushkin@me.com> | 2014-04-03 23:47:09 +0400 |
commit | 60355b4e6c0a6916084442d0557cacd74b008b82 (patch) | |
tree | 0aad5f0998b0855a4015b5ad8cdea9dcc17009cd /src/modules | |
parent | 3641faed0c696f1a88f88a17b5666ed5c3ba8b1c (diff) | |
download | px4-firmware-60355b4e6c0a6916084442d0557cacd74b008b82.tar.gz px4-firmware-60355b4e6c0a6916084442d0557cacd74b008b82.tar.bz2 px4-firmware-60355b4e6c0a6916084442d0557cacd74b008b82.zip |
sensors: switch position reading bug fixed
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/sensors/sensors.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/sensors/sensors.cpp b/src/modules/sensors/sensors.cpp index 669f4e174..79b53a79c 100644 --- a/src/modules/sensors/sensors.cpp +++ b/src/modules/sensors/sensors.cpp @@ -1305,7 +1305,7 @@ Sensors::get_rc_switch_position(enum RC_CHANNELS_FUNCTION func) if (value > STICK_ON_OFF_LIMIT) { return SWITCH_POS_ON; - } else if (value < STICK_ON_OFF_LIMIT) { + } else if (value < -STICK_ON_OFF_LIMIT) { return SWITCH_POS_OFF; } else { |