diff options
author | px4dev <px4@purgatory.org> | 2012-08-18 22:56:04 -0700 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2012-08-18 22:56:04 -0700 |
commit | 84777544114d3d185a2fee0d30e3187c7f6ab27e (patch) | |
tree | 13e58186732ca45040b928a6c535ad83e3c3de4b /apps/px4io | |
parent | fcad5b52c52484470c897cdde745e62008c61e7d (diff) | |
download | px4-firmware-84777544114d3d185a2fee0d30e3187c7f6ab27e.tar.gz px4-firmware-84777544114d3d185a2fee0d30e3187c7f6ab27e.tar.bz2 px4-firmware-84777544114d3d185a2fee0d30e3187c7f6ab27e.zip |
Share the PX4IO protocol header, such as it is, between the two apps.
Stop using systemlib in the PX4IO firmware; it has expectations that can't reasonably be met.
Diffstat (limited to 'apps/px4io')
-rw-r--r-- | apps/px4io/Makefile | 11 | ||||
-rw-r--r-- | apps/px4io/protocol.h | 8 |
2 files changed, 17 insertions, 2 deletions
diff --git a/apps/px4io/Makefile b/apps/px4io/Makefile index 06be90a0c..9b63d3ac8 100644 --- a/apps/px4io/Makefile +++ b/apps/px4io/Makefile @@ -35,4 +35,15 @@ # Build the px4io application. # +# +# Note that we pull a couple of specific files from the systemlib, since +# we can't support it all. +# +CSRCS = comms.c \ + mixer.c \ + px4io.c \ + safety.c \ + ../systemlib/hx_stream.c \ + ../systemlib/perf_counter.c + include $(APPDIR)/mk/app.mk diff --git a/apps/px4io/protocol.h b/apps/px4io/protocol.h index 92558a61d..96e0ca350 100644 --- a/apps/px4io/protocol.h +++ b/apps/px4io/protocol.h @@ -48,6 +48,8 @@ #define PX4IO_INPUT_CHANNELS 12 #define PX4IO_RELAY_CHANNELS 2 +#pragma pack(push, 1) + /* command from FMU to IO */ struct px4io_command { uint16_t f2i_magic; @@ -56,7 +58,7 @@ struct px4io_command { uint16_t servo_command[PX4IO_OUTPUT_CHANNELS]; bool relay_state[PX4IO_RELAY_CHANNELS]; bool arm_ok; -} __attribute__((packed)); +}; /* report from IO to FMU */ struct px4io_report { @@ -66,4 +68,6 @@ struct px4io_report { uint16_t rc_channel[PX4IO_INPUT_CHANNELS]; bool armed; uint8_t channel_count; -} __attribute__((packed)); +}; + +#pragma pack(pop)
\ No newline at end of file |