diff options
author | Lorenz Meier <lorenz@px4.io> | 2015-03-25 19:14:33 -0700 |
---|---|---|
committer | Lorenz Meier <lorenz@px4.io> | 2015-03-25 19:14:33 -0700 |
commit | 4318a26b64330bbc50a3df6846efe81eaa83aa38 (patch) | |
tree | 596ca7ea348bf74f38e5ee9d9255019163192c51 /src/drivers/px4io/px4io.cpp | |
parent | 7554eb515a9b87658e860de3ceee552beff610ee (diff) | |
parent | 20f6fbd864dd2ad02650588ea107945b25c439f6 (diff) | |
download | px4-firmware-4318a26b64330bbc50a3df6846efe81eaa83aa38.tar.gz px4-firmware-4318a26b64330bbc50a3df6846efe81eaa83aa38.tar.bz2 px4-firmware-4318a26b64330bbc50a3df6846efe81eaa83aa38.zip |
Merge pull request #1950 from philipoe/PR/PX4IO_RC_Mapping_Fix
PX4IO driver: Add mapping of AUX1-3 channels, in case these are also use...
Diffstat (limited to 'src/drivers/px4io/px4io.cpp')
-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)) { |