PX4IO driver: Add mapping of AUX1-3 channels, in case these are also used as control surface inputs

This commit is contained in:
philipoe 2015-03-24 12:48:00 +01:00
parent fff74304f0
commit 20f6fbd864
1 changed files with 18 additions and 0 deletions

View File

@ -1291,6 +1291,24 @@ PX4IO::io_set_rc_config()
input_map[ichan - 1] = 4;
}
/* AUX 1*/
param_get(param_find("RC_MAP_AUX1"), &ichan);
if ((ichan > 0) && (ichan <= (int)_max_rc_input)) {
input_map[ichan - 1] = 5;
}
/* AUX 2*/
param_get(param_find("RC_MAP_AUX2"), &ichan);
if ((ichan > 0) && (ichan <= (int)_max_rc_input)) {
input_map[ichan - 1] = 6;
}
/* AUX 3*/
param_get(param_find("RC_MAP_AUX3"), &ichan);
if ((ichan > 0) && (ichan <= (int)_max_rc_input)) {
input_map[ichan - 1] = 7;
}
/* MAIN MODE SWITCH */
param_get(param_find("RC_MAP_MODE_SW"), &ichan);
if ((ichan > 0) && (ichan <= (int)_max_rc_input)) {