aboutsummaryrefslogtreecommitdiff
path: root/apps/px4io/protocol.h
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2012-12-30 10:49:27 +0100
committerLorenz Meier <lm@inf.ethz.ch>2012-12-30 10:49:27 +0100
commitabe1b9759a7b4f3114a91aa63b1e8caf8d37d9aa (patch)
treeeb3efcfbcb9ce87dbf8708755bf5eef761a159bd /apps/px4io/protocol.h
parent142556b442b1c88ed2ede2cb9904a6a324051e71 (diff)
parentf6ea42ab5e886b3475350c5dab95b5985bda26bc (diff)
downloadpx4-firmware-abe1b9759a7b4f3114a91aa63b1e8caf8d37d9aa.tar.gz
px4-firmware-abe1b9759a7b4f3114a91aa63b1e8caf8d37d9aa.tar.bz2
px4-firmware-abe1b9759a7b4f3114a91aa63b1e8caf8d37d9aa.zip
Merged IO mixing branch
Diffstat (limited to 'apps/px4io/protocol.h')
-rw-r--r--apps/px4io/protocol.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/px4io/protocol.h b/apps/px4io/protocol.h
index 5b485e2ff..c53b94eb0 100644
--- a/apps/px4io/protocol.h
+++ b/apps/px4io/protocol.h
@@ -41,7 +41,7 @@
#pragma once
-#define PX4IO_OUTPUT_CHANNELS 8
+#define PX4IO_CONTROL_CHANNELS 8
#define PX4IO_INPUT_CHANNELS 12
#define PX4IO_RELAY_CHANNELS 4
@@ -55,7 +55,8 @@ struct px4io_command {
#define F2I_MAGIC 0x636d
uint16_t servo_command[PX4IO_OUTPUT_CHANNELS]; /**< servo output channels */
- uint16_t servo_rate; /**< PWM output rate in Hz */
+ uint16_t servo_rate;
+ uint16_t output_control[PX4IO_CONTROL_CHANNELS]; /**< PWM output rate in Hz */
bool relay_state[PX4IO_RELAY_CHANNELS]; /**< relay states as requested by FMU */
bool arm_ok; /**< FMU allows full arming */
bool vector_flight_mode_ok; /**< FMU aquired a valid position lock, ready for pos control */
@@ -102,6 +103,6 @@ struct px4io_mixdata {
};
/* maximum size is limited by the HX frame size */
-#define F2I_MIXER_MAX_TEXT (sizeof(struct px4io_mixdata) - HX_STREAM_MAX_FRAME)
+#define F2I_MIXER_MAX_TEXT (HX_STREAM_MAX_FRAME - sizeof(struct px4io_mixdata))
#pragma pack(pop) \ No newline at end of file