diff options
author | Julian Oes <julian@oes.ch> | 2013-09-03 09:34:25 +0200 |
---|---|---|
committer | Julian Oes <julian@oes.ch> | 2013-09-03 09:34:25 +0200 |
commit | 96e7f42844abbd2a3ef36e207e639c0dffe75e66 (patch) | |
tree | 4ef89b11ababd57c5d16a1d531918127fbc722d4 /src/modules/px4iofirmware/dsm.c | |
parent | 1fed9ef1b1ec2d0bf7c2cba7d60be77e37faaf40 (diff) | |
parent | 2457013bbba3e15e3fbfcc45f07428f006d56dcd (diff) | |
download | px4-firmware-96e7f42844abbd2a3ef36e207e639c0dffe75e66.tar.gz px4-firmware-96e7f42844abbd2a3ef36e207e639c0dffe75e66.tar.bz2 px4-firmware-96e7f42844abbd2a3ef36e207e639c0dffe75e66.zip |
Merge branch 'master' into python3_compat
Diffstat (limited to 'src/modules/px4iofirmware/dsm.c')
-rw-r--r-- | src/modules/px4iofirmware/dsm.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/modules/px4iofirmware/dsm.c b/src/modules/px4iofirmware/dsm.c index 745cdfa40..206e27db5 100644 --- a/src/modules/px4iofirmware/dsm.c +++ b/src/modules/px4iofirmware/dsm.c @@ -53,13 +53,13 @@ #define DSM_FRAME_SIZE 16 /**<DSM frame size in bytes*/ #define DSM_FRAME_CHANNELS 7 /**<Max supported DSM channels*/ -static int dsm_fd = -1; /**<File handle to the DSM UART*/ -static hrt_abstime dsm_last_rx_time; /**<Timestamp when we last received*/ -static hrt_abstime dsm_last_frame_time; /**<Timestamp for start of last dsm frame*/ -static uint8_t dsm_frame[DSM_FRAME_SIZE]; /**<DSM dsm frame receive buffer*/ -static unsigned dsm_partial_frame_count; /**<Count of bytes received for current dsm frame*/ -static unsigned dsm_channel_shift; /**<Channel resolution, 0=unknown, 1=10 bit, 2=11 bit*/ -static unsigned dsm_frame_drops; /**<Count of incomplete DSM frames*/ +static int dsm_fd = -1; /**< File handle to the DSM UART */ +static hrt_abstime dsm_last_rx_time; /**< Timestamp when we last received */ +static hrt_abstime dsm_last_frame_time; /**< Timestamp for start of last dsm frame */ +static uint8_t dsm_frame[DSM_FRAME_SIZE]; /**< DSM dsm frame receive buffer */ +static unsigned dsm_partial_frame_count; /**< Count of bytes received for current dsm frame */ +static unsigned dsm_channel_shift; /**< Channel resolution, 0=unknown, 1=10 bit, 2=11 bit */ +static unsigned dsm_frame_drops; /**< Count of incomplete DSM frames */ /** * Attempt to decode a single channel raw channel datum @@ -249,6 +249,10 @@ dsm_bind(uint16_t cmd, int pulses) if (dsm_fd < 0) return; +#ifdef CONFIG_ARCH_BOARD_PX4IO_V2 + // XXX implement + #warning DSM BIND NOT IMPLEMENTED ON PX4IO V2 +#else switch (cmd) { case dsm_bind_power_down: @@ -288,6 +292,7 @@ dsm_bind(uint16_t cmd, int pulses) break; } +#endif } /** |