aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2013-12-08 21:34:31 +0100
committerThomas Gubler <thomasgubler@gmail.com>2013-12-08 21:35:16 +0100
commit5e273bf225ac5ed57c10093296a00ee190cfbf7d (patch)
tree5bd138d7b195e1838bef6295bb997491499fa5b3 /src/modules
parentcbde8d27f8a18eeb14038521115fd5bd2f97e29a (diff)
downloadpx4-firmware-5e273bf225ac5ed57c10093296a00ee190cfbf7d.tar.gz
px4-firmware-5e273bf225ac5ed57c10093296a00ee190cfbf7d.tar.bz2
px4-firmware-5e273bf225ac5ed57c10093296a00ee190cfbf7d.zip
px4iofirmware: in manual mode: ignore control indices which are not controlled by the rmeote control
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/px4iofirmware/mixer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/px4iofirmware/mixer.cpp b/src/modules/px4iofirmware/mixer.cpp
index 9bb93ce9f..87844ca70 100644
--- a/src/modules/px4iofirmware/mixer.cpp
+++ b/src/modules/px4iofirmware/mixer.cpp
@@ -248,7 +248,7 @@ mixer_callback(uintptr_t handle,
return -1;
case MIX_OVERRIDE:
- if (r_page_rc_input[PX4IO_P_RC_VALID] & (1 << control_index)) {
+ if ((r_page_rc_input[PX4IO_P_RC_VALID] & (1 << control_index)) && CONTROL_PAGE_INDEX(control_group, control_index) < PX4IO_RC_INPUT_CHANNELS) {
control = REG_TO_FLOAT(r_page_rc_input[PX4IO_P_RC_BASE + control_index]);
break;
}