px4iofirmware: in manual mode: ignore control indices which are not controlled by the rmeote control

This commit is contained in:
Thomas Gubler 2013-12-08 21:34:31 +01:00
parent cbde8d27f8
commit 5e273bf225
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}