diff options
author | philipoe <philipp.oettershagen@mavt.ethz.ch> | 2015-03-24 12:48:00 +0100 |
---|---|---|
committer | philipoe <philipp.oettershagen@mavt.ethz.ch> | 2015-03-24 12:50:48 +0100 |
commit | 20f6fbd864dd2ad02650588ea107945b25c439f6 (patch) | |
tree | acef3c4fda471db149138b4a374fb4d08bf08137 /src | |
parent | fff74304f02d5077124acfca18851465b5da8402 (diff) | |
download | px4-firmware-20f6fbd864dd2ad02650588ea107945b25c439f6.tar.gz px4-firmware-20f6fbd864dd2ad02650588ea107945b25c439f6.tar.bz2 px4-firmware-20f6fbd864dd2ad02650588ea107945b25c439f6.zip |
PX4IO driver: Add mapping of AUX1-3 channels, in case these are also used as control surface inputs
Diffstat (limited to 'src')
-rw-r--r-- | src/drivers/px4io/px4io.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/drivers/px4io/px4io.cpp b/src/drivers/px4io/px4io.cpp index f62df54f6..1512566fa 100644 --- a/src/drivers/px4io/px4io.cpp +++ b/src/drivers/px4io/px4io.cpp @@ -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)) { |