diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-12-08 11:25:45 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-12-08 11:25:45 +0100 |
commit | 0ba507b640223e2bf45d3727cac1603bef215dde (patch) | |
tree | 45513cabf6bed6484b20c5587aca0ed03145db2d /src/modules/px4iofirmware/mixer.cpp | |
parent | 264ef47197432d2cc1372cabf93c3bd7a52df0aa (diff) | |
download | px4-firmware-0ba507b640223e2bf45d3727cac1603bef215dde.tar.gz px4-firmware-0ba507b640223e2bf45d3727cac1603bef215dde.tar.bz2 px4-firmware-0ba507b640223e2bf45d3727cac1603bef215dde.zip |
Added support for a total of four control groups to the IO driver and IO firmware. This allows to run auxiliary payload. Cleaned up defines for RC input channel counts, this needs another sweep to then finally allow up to 16 mapped channels and up to 20-24 RAW RC channels
Diffstat (limited to 'src/modules/px4iofirmware/mixer.cpp')
-rw-r--r-- | src/modules/px4iofirmware/mixer.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/px4iofirmware/mixer.cpp b/src/modules/px4iofirmware/mixer.cpp index 05897b4ce..9bb93ce9f 100644 --- a/src/modules/px4iofirmware/mixer.cpp +++ b/src/modules/px4iofirmware/mixer.cpp @@ -236,13 +236,13 @@ mixer_callback(uintptr_t handle, uint8_t control_index, float &control) { - if (control_group != 0) + if (control_group > 3) return -1; switch (source) { case MIX_FMU: if (control_index < PX4IO_CONTROL_CHANNELS) { - control = REG_TO_FLOAT(r_page_controls[control_index]); + control = REG_TO_FLOAT(r_page_controls[CONTROL_PAGE_INDEX(control_group, control_index)]); break; } return -1; |