aboutsummaryrefslogtreecommitdiff
path: root/src/modules/px4iofirmware/px4io.h
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2013-12-08 11:25:45 +0100
committerLorenz Meier <lm@inf.ethz.ch>2013-12-08 11:25:45 +0100
commit0ba507b640223e2bf45d3727cac1603bef215dde (patch)
tree45513cabf6bed6484b20c5587aca0ed03145db2d /src/modules/px4iofirmware/px4io.h
parent264ef47197432d2cc1372cabf93c3bd7a52df0aa (diff)
downloadpx4-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/px4io.h')
-rw-r--r--src/modules/px4iofirmware/px4io.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/modules/px4iofirmware/px4io.h b/src/modules/px4iofirmware/px4io.h
index 4fea0288c..61eacd602 100644
--- a/src/modules/px4iofirmware/px4io.h
+++ b/src/modules/px4iofirmware/px4io.h
@@ -53,7 +53,9 @@
*/
#define PX4IO_SERVO_COUNT 8
#define PX4IO_CONTROL_CHANNELS 8
-#define PX4IO_INPUT_CHANNELS 8 // XXX this should be 18 channels
+#define PX4IO_CONTROL_GROUPS 2
+#define PX4IO_RC_INPUT_CHANNELS 8 // XXX this should be 18 channels
+#define PX4IO_RC_MAPPED_CONTROL_CHANNELS 8 /**< This is the maximum number of channels mapped/used */
/*
* Debug logging
@@ -169,6 +171,8 @@ extern pwm_limit_t pwm_limit;
#define BUTTON_SAFETY stm32_gpioread(GPIO_BTN_SAFETY)
+#define CONTROL_PAGE_INDEX(_group, _channel) (_group * PX4IO_CONTROL_CHANNELS + _channel)
+
/*
* Mixer
*/