Code for autonomous rover for Sparkfun AVC. DataBus won 3rd in 2012 and the same code was used on Troubled Child, a 1986 Jeep Grand Wagoneer to win 1st in 2014.

Dependencies:   mbed Watchdog SDFileSystem DigoleSerialDisp

Committer:
shimniok
Date:
Mon May 27 13:26:03 2013 +0000
Revision:
0:a6a169de725f
Working version with priorities set and update time display

Who changed what in which revision?

UserRevisionLine numberNew contents of line
shimniok 0:a6a169de725f 1 // MESSAGE RC_CHANNELS_OVERRIDE PACKING
shimniok 0:a6a169de725f 2
shimniok 0:a6a169de725f 3 #define MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE 70
shimniok 0:a6a169de725f 4
shimniok 0:a6a169de725f 5 typedef struct __mavlink_rc_channels_override_t
shimniok 0:a6a169de725f 6 {
shimniok 0:a6a169de725f 7 uint8_t target_system; ///< System ID
shimniok 0:a6a169de725f 8 uint8_t target_component; ///< Component ID
shimniok 0:a6a169de725f 9 uint16_t chan1_raw; ///< RC channel 1 value, in microseconds
shimniok 0:a6a169de725f 10 uint16_t chan2_raw; ///< RC channel 2 value, in microseconds
shimniok 0:a6a169de725f 11 uint16_t chan3_raw; ///< RC channel 3 value, in microseconds
shimniok 0:a6a169de725f 12 uint16_t chan4_raw; ///< RC channel 4 value, in microseconds
shimniok 0:a6a169de725f 13 uint16_t chan5_raw; ///< RC channel 5 value, in microseconds
shimniok 0:a6a169de725f 14 uint16_t chan6_raw; ///< RC channel 6 value, in microseconds
shimniok 0:a6a169de725f 15 uint16_t chan7_raw; ///< RC channel 7 value, in microseconds
shimniok 0:a6a169de725f 16 uint16_t chan8_raw; ///< RC channel 8 value, in microseconds
shimniok 0:a6a169de725f 17
shimniok 0:a6a169de725f 18 } mavlink_rc_channels_override_t;
shimniok 0:a6a169de725f 19
shimniok 0:a6a169de725f 20
shimniok 0:a6a169de725f 21
shimniok 0:a6a169de725f 22 /**
shimniok 0:a6a169de725f 23 * @brief Pack a rc_channels_override message
shimniok 0:a6a169de725f 24 * @param system_id ID of this system
shimniok 0:a6a169de725f 25 * @param component_id ID of this component (e.g. 200 for IMU)
shimniok 0:a6a169de725f 26 * @param msg The MAVLink message to compress the data into
shimniok 0:a6a169de725f 27 *
shimniok 0:a6a169de725f 28 * @param target_system System ID
shimniok 0:a6a169de725f 29 * @param target_component Component ID
shimniok 0:a6a169de725f 30 * @param chan1_raw RC channel 1 value, in microseconds
shimniok 0:a6a169de725f 31 * @param chan2_raw RC channel 2 value, in microseconds
shimniok 0:a6a169de725f 32 * @param chan3_raw RC channel 3 value, in microseconds
shimniok 0:a6a169de725f 33 * @param chan4_raw RC channel 4 value, in microseconds
shimniok 0:a6a169de725f 34 * @param chan5_raw RC channel 5 value, in microseconds
shimniok 0:a6a169de725f 35 * @param chan6_raw RC channel 6 value, in microseconds
shimniok 0:a6a169de725f 36 * @param chan7_raw RC channel 7 value, in microseconds
shimniok 0:a6a169de725f 37 * @param chan8_raw RC channel 8 value, in microseconds
shimniok 0:a6a169de725f 38 * @return length of the message in bytes (excluding serial stream start sign)
shimniok 0:a6a169de725f 39 */
shimniok 0:a6a169de725f 40 static inline uint16_t mavlink_msg_rc_channels_override_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, uint8_t target_system, uint8_t target_component, uint16_t chan1_raw, uint16_t chan2_raw, uint16_t chan3_raw, uint16_t chan4_raw, uint16_t chan5_raw, uint16_t chan6_raw, uint16_t chan7_raw, uint16_t chan8_raw)
shimniok 0:a6a169de725f 41 {
shimniok 0:a6a169de725f 42 uint16_t i = 0;
shimniok 0:a6a169de725f 43 msg->msgid = MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE;
shimniok 0:a6a169de725f 44
shimniok 0:a6a169de725f 45 i += put_uint8_t_by_index(target_system, i, msg->payload); // System ID
shimniok 0:a6a169de725f 46 i += put_uint8_t_by_index(target_component, i, msg->payload); // Component ID
shimniok 0:a6a169de725f 47 i += put_uint16_t_by_index(chan1_raw, i, msg->payload); // RC channel 1 value, in microseconds
shimniok 0:a6a169de725f 48 i += put_uint16_t_by_index(chan2_raw, i, msg->payload); // RC channel 2 value, in microseconds
shimniok 0:a6a169de725f 49 i += put_uint16_t_by_index(chan3_raw, i, msg->payload); // RC channel 3 value, in microseconds
shimniok 0:a6a169de725f 50 i += put_uint16_t_by_index(chan4_raw, i, msg->payload); // RC channel 4 value, in microseconds
shimniok 0:a6a169de725f 51 i += put_uint16_t_by_index(chan5_raw, i, msg->payload); // RC channel 5 value, in microseconds
shimniok 0:a6a169de725f 52 i += put_uint16_t_by_index(chan6_raw, i, msg->payload); // RC channel 6 value, in microseconds
shimniok 0:a6a169de725f 53 i += put_uint16_t_by_index(chan7_raw, i, msg->payload); // RC channel 7 value, in microseconds
shimniok 0:a6a169de725f 54 i += put_uint16_t_by_index(chan8_raw, i, msg->payload); // RC channel 8 value, in microseconds
shimniok 0:a6a169de725f 55
shimniok 0:a6a169de725f 56 return mavlink_finalize_message(msg, system_id, component_id, i);
shimniok 0:a6a169de725f 57 }
shimniok 0:a6a169de725f 58
shimniok 0:a6a169de725f 59 /**
shimniok 0:a6a169de725f 60 * @brief Pack a rc_channels_override message
shimniok 0:a6a169de725f 61 * @param system_id ID of this system
shimniok 0:a6a169de725f 62 * @param component_id ID of this component (e.g. 200 for IMU)
shimniok 0:a6a169de725f 63 * @param chan The MAVLink channel this message was sent over
shimniok 0:a6a169de725f 64 * @param msg The MAVLink message to compress the data into
shimniok 0:a6a169de725f 65 * @param target_system System ID
shimniok 0:a6a169de725f 66 * @param target_component Component ID
shimniok 0:a6a169de725f 67 * @param chan1_raw RC channel 1 value, in microseconds
shimniok 0:a6a169de725f 68 * @param chan2_raw RC channel 2 value, in microseconds
shimniok 0:a6a169de725f 69 * @param chan3_raw RC channel 3 value, in microseconds
shimniok 0:a6a169de725f 70 * @param chan4_raw RC channel 4 value, in microseconds
shimniok 0:a6a169de725f 71 * @param chan5_raw RC channel 5 value, in microseconds
shimniok 0:a6a169de725f 72 * @param chan6_raw RC channel 6 value, in microseconds
shimniok 0:a6a169de725f 73 * @param chan7_raw RC channel 7 value, in microseconds
shimniok 0:a6a169de725f 74 * @param chan8_raw RC channel 8 value, in microseconds
shimniok 0:a6a169de725f 75 * @return length of the message in bytes (excluding serial stream start sign)
shimniok 0:a6a169de725f 76 */
shimniok 0:a6a169de725f 77 static inline uint16_t mavlink_msg_rc_channels_override_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, uint8_t target_system, uint8_t target_component, uint16_t chan1_raw, uint16_t chan2_raw, uint16_t chan3_raw, uint16_t chan4_raw, uint16_t chan5_raw, uint16_t chan6_raw, uint16_t chan7_raw, uint16_t chan8_raw)
shimniok 0:a6a169de725f 78 {
shimniok 0:a6a169de725f 79 uint16_t i = 0;
shimniok 0:a6a169de725f 80 msg->msgid = MAVLINK_MSG_ID_RC_CHANNELS_OVERRIDE;
shimniok 0:a6a169de725f 81
shimniok 0:a6a169de725f 82 i += put_uint8_t_by_index(target_system, i, msg->payload); // System ID
shimniok 0:a6a169de725f 83 i += put_uint8_t_by_index(target_component, i, msg->payload); // Component ID
shimniok 0:a6a169de725f 84 i += put_uint16_t_by_index(chan1_raw, i, msg->payload); // RC channel 1 value, in microseconds
shimniok 0:a6a169de725f 85 i += put_uint16_t_by_index(chan2_raw, i, msg->payload); // RC channel 2 value, in microseconds
shimniok 0:a6a169de725f 86 i += put_uint16_t_by_index(chan3_raw, i, msg->payload); // RC channel 3 value, in microseconds
shimniok 0:a6a169de725f 87 i += put_uint16_t_by_index(chan4_raw, i, msg->payload); // RC channel 4 value, in microseconds
shimniok 0:a6a169de725f 88 i += put_uint16_t_by_index(chan5_raw, i, msg->payload); // RC channel 5 value, in microseconds
shimniok 0:a6a169de725f 89 i += put_uint16_t_by_index(chan6_raw, i, msg->payload); // RC channel 6 value, in microseconds
shimniok 0:a6a169de725f 90 i += put_uint16_t_by_index(chan7_raw, i, msg->payload); // RC channel 7 value, in microseconds
shimniok 0:a6a169de725f 91 i += put_uint16_t_by_index(chan8_raw, i, msg->payload); // RC channel 8 value, in microseconds
shimniok 0:a6a169de725f 92
shimniok 0:a6a169de725f 93 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, i);
shimniok 0:a6a169de725f 94 }
shimniok 0:a6a169de725f 95
shimniok 0:a6a169de725f 96 /**
shimniok 0:a6a169de725f 97 * @brief Encode a rc_channels_override struct into a message
shimniok 0:a6a169de725f 98 *
shimniok 0:a6a169de725f 99 * @param system_id ID of this system
shimniok 0:a6a169de725f 100 * @param component_id ID of this component (e.g. 200 for IMU)
shimniok 0:a6a169de725f 101 * @param msg The MAVLink message to compress the data into
shimniok 0:a6a169de725f 102 * @param rc_channels_override C-struct to read the message contents from
shimniok 0:a6a169de725f 103 */
shimniok 0:a6a169de725f 104 static inline uint16_t mavlink_msg_rc_channels_override_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_rc_channels_override_t* rc_channels_override)
shimniok 0:a6a169de725f 105 {
shimniok 0:a6a169de725f 106 return mavlink_msg_rc_channels_override_pack(system_id, component_id, msg, rc_channels_override->target_system, rc_channels_override->target_component, rc_channels_override->chan1_raw, rc_channels_override->chan2_raw, rc_channels_override->chan3_raw, rc_channels_override->chan4_raw, rc_channels_override->chan5_raw, rc_channels_override->chan6_raw, rc_channels_override->chan7_raw, rc_channels_override->chan8_raw);
shimniok 0:a6a169de725f 107 }
shimniok 0:a6a169de725f 108
shimniok 0:a6a169de725f 109 /**
shimniok 0:a6a169de725f 110 * @brief Send a rc_channels_override message
shimniok 0:a6a169de725f 111 * @param chan MAVLink channel to send the message
shimniok 0:a6a169de725f 112 *
shimniok 0:a6a169de725f 113 * @param target_system System ID
shimniok 0:a6a169de725f 114 * @param target_component Component ID
shimniok 0:a6a169de725f 115 * @param chan1_raw RC channel 1 value, in microseconds
shimniok 0:a6a169de725f 116 * @param chan2_raw RC channel 2 value, in microseconds
shimniok 0:a6a169de725f 117 * @param chan3_raw RC channel 3 value, in microseconds
shimniok 0:a6a169de725f 118 * @param chan4_raw RC channel 4 value, in microseconds
shimniok 0:a6a169de725f 119 * @param chan5_raw RC channel 5 value, in microseconds
shimniok 0:a6a169de725f 120 * @param chan6_raw RC channel 6 value, in microseconds
shimniok 0:a6a169de725f 121 * @param chan7_raw RC channel 7 value, in microseconds
shimniok 0:a6a169de725f 122 * @param chan8_raw RC channel 8 value, in microseconds
shimniok 0:a6a169de725f 123 */
shimniok 0:a6a169de725f 124 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
shimniok 0:a6a169de725f 125
shimniok 0:a6a169de725f 126 static inline void mavlink_msg_rc_channels_override_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t chan1_raw, uint16_t chan2_raw, uint16_t chan3_raw, uint16_t chan4_raw, uint16_t chan5_raw, uint16_t chan6_raw, uint16_t chan7_raw, uint16_t chan8_raw)
shimniok 0:a6a169de725f 127 {
shimniok 0:a6a169de725f 128 mavlink_message_t msg;
shimniok 0:a6a169de725f 129 mavlink_msg_rc_channels_override_pack_chan(mavlink_system.sysid, mavlink_system.compid, chan, &msg, target_system, target_component, chan1_raw, chan2_raw, chan3_raw, chan4_raw, chan5_raw, chan6_raw, chan7_raw, chan8_raw);
shimniok 0:a6a169de725f 130 mavlink_send_uart(chan, &msg);
shimniok 0:a6a169de725f 131 }
shimniok 0:a6a169de725f 132
shimniok 0:a6a169de725f 133 #endif
shimniok 0:a6a169de725f 134 // MESSAGE RC_CHANNELS_OVERRIDE UNPACKING
shimniok 0:a6a169de725f 135
shimniok 0:a6a169de725f 136 /**
shimniok 0:a6a169de725f 137 * @brief Get field target_system from rc_channels_override message
shimniok 0:a6a169de725f 138 *
shimniok 0:a6a169de725f 139 * @return System ID
shimniok 0:a6a169de725f 140 */
shimniok 0:a6a169de725f 141 static inline uint8_t mavlink_msg_rc_channels_override_get_target_system(const mavlink_message_t* msg)
shimniok 0:a6a169de725f 142 {
shimniok 0:a6a169de725f 143 return (uint8_t)(msg->payload)[0];
shimniok 0:a6a169de725f 144 }
shimniok 0:a6a169de725f 145
shimniok 0:a6a169de725f 146 /**
shimniok 0:a6a169de725f 147 * @brief Get field target_component from rc_channels_override message
shimniok 0:a6a169de725f 148 *
shimniok 0:a6a169de725f 149 * @return Component ID
shimniok 0:a6a169de725f 150 */
shimniok 0:a6a169de725f 151 static inline uint8_t mavlink_msg_rc_channels_override_get_target_component(const mavlink_message_t* msg)
shimniok 0:a6a169de725f 152 {
shimniok 0:a6a169de725f 153 return (uint8_t)(msg->payload+sizeof(uint8_t))[0];
shimniok 0:a6a169de725f 154 }
shimniok 0:a6a169de725f 155
shimniok 0:a6a169de725f 156 /**
shimniok 0:a6a169de725f 157 * @brief Get field chan1_raw from rc_channels_override message
shimniok 0:a6a169de725f 158 *
shimniok 0:a6a169de725f 159 * @return RC channel 1 value, in microseconds
shimniok 0:a6a169de725f 160 */
shimniok 0:a6a169de725f 161 static inline uint16_t mavlink_msg_rc_channels_override_get_chan1_raw(const mavlink_message_t* msg)
shimniok 0:a6a169de725f 162 {
shimniok 0:a6a169de725f 163 generic_16bit r;
shimniok 0:a6a169de725f 164 r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t))[0];
shimniok 0:a6a169de725f 165 r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t))[1];
shimniok 0:a6a169de725f 166 return (uint16_t)r.s;
shimniok 0:a6a169de725f 167 }
shimniok 0:a6a169de725f 168
shimniok 0:a6a169de725f 169 /**
shimniok 0:a6a169de725f 170 * @brief Get field chan2_raw from rc_channels_override message
shimniok 0:a6a169de725f 171 *
shimniok 0:a6a169de725f 172 * @return RC channel 2 value, in microseconds
shimniok 0:a6a169de725f 173 */
shimniok 0:a6a169de725f 174 static inline uint16_t mavlink_msg_rc_channels_override_get_chan2_raw(const mavlink_message_t* msg)
shimniok 0:a6a169de725f 175 {
shimniok 0:a6a169de725f 176 generic_16bit r;
shimniok 0:a6a169de725f 177 r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint16_t))[0];
shimniok 0:a6a169de725f 178 r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint16_t))[1];
shimniok 0:a6a169de725f 179 return (uint16_t)r.s;
shimniok 0:a6a169de725f 180 }
shimniok 0:a6a169de725f 181
shimniok 0:a6a169de725f 182 /**
shimniok 0:a6a169de725f 183 * @brief Get field chan3_raw from rc_channels_override message
shimniok 0:a6a169de725f 184 *
shimniok 0:a6a169de725f 185 * @return RC channel 3 value, in microseconds
shimniok 0:a6a169de725f 186 */
shimniok 0:a6a169de725f 187 static inline uint16_t mavlink_msg_rc_channels_override_get_chan3_raw(const mavlink_message_t* msg)
shimniok 0:a6a169de725f 188 {
shimniok 0:a6a169de725f 189 generic_16bit r;
shimniok 0:a6a169de725f 190 r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint16_t)+sizeof(uint16_t))[0];
shimniok 0:a6a169de725f 191 r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint16_t)+sizeof(uint16_t))[1];
shimniok 0:a6a169de725f 192 return (uint16_t)r.s;
shimniok 0:a6a169de725f 193 }
shimniok 0:a6a169de725f 194
shimniok 0:a6a169de725f 195 /**
shimniok 0:a6a169de725f 196 * @brief Get field chan4_raw from rc_channels_override message
shimniok 0:a6a169de725f 197 *
shimniok 0:a6a169de725f 198 * @return RC channel 4 value, in microseconds
shimniok 0:a6a169de725f 199 */
shimniok 0:a6a169de725f 200 static inline uint16_t mavlink_msg_rc_channels_override_get_chan4_raw(const mavlink_message_t* msg)
shimniok 0:a6a169de725f 201 {
shimniok 0:a6a169de725f 202 generic_16bit r;
shimniok 0:a6a169de725f 203 r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t))[0];
shimniok 0:a6a169de725f 204 r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t))[1];
shimniok 0:a6a169de725f 205 return (uint16_t)r.s;
shimniok 0:a6a169de725f 206 }
shimniok 0:a6a169de725f 207
shimniok 0:a6a169de725f 208 /**
shimniok 0:a6a169de725f 209 * @brief Get field chan5_raw from rc_channels_override message
shimniok 0:a6a169de725f 210 *
shimniok 0:a6a169de725f 211 * @return RC channel 5 value, in microseconds
shimniok 0:a6a169de725f 212 */
shimniok 0:a6a169de725f 213 static inline uint16_t mavlink_msg_rc_channels_override_get_chan5_raw(const mavlink_message_t* msg)
shimniok 0:a6a169de725f 214 {
shimniok 0:a6a169de725f 215 generic_16bit r;
shimniok 0:a6a169de725f 216 r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t))[0];
shimniok 0:a6a169de725f 217 r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t))[1];
shimniok 0:a6a169de725f 218 return (uint16_t)r.s;
shimniok 0:a6a169de725f 219 }
shimniok 0:a6a169de725f 220
shimniok 0:a6a169de725f 221 /**
shimniok 0:a6a169de725f 222 * @brief Get field chan6_raw from rc_channels_override message
shimniok 0:a6a169de725f 223 *
shimniok 0:a6a169de725f 224 * @return RC channel 6 value, in microseconds
shimniok 0:a6a169de725f 225 */
shimniok 0:a6a169de725f 226 static inline uint16_t mavlink_msg_rc_channels_override_get_chan6_raw(const mavlink_message_t* msg)
shimniok 0:a6a169de725f 227 {
shimniok 0:a6a169de725f 228 generic_16bit r;
shimniok 0:a6a169de725f 229 r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t))[0];
shimniok 0:a6a169de725f 230 r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t))[1];
shimniok 0:a6a169de725f 231 return (uint16_t)r.s;
shimniok 0:a6a169de725f 232 }
shimniok 0:a6a169de725f 233
shimniok 0:a6a169de725f 234 /**
shimniok 0:a6a169de725f 235 * @brief Get field chan7_raw from rc_channels_override message
shimniok 0:a6a169de725f 236 *
shimniok 0:a6a169de725f 237 * @return RC channel 7 value, in microseconds
shimniok 0:a6a169de725f 238 */
shimniok 0:a6a169de725f 239 static inline uint16_t mavlink_msg_rc_channels_override_get_chan7_raw(const mavlink_message_t* msg)
shimniok 0:a6a169de725f 240 {
shimniok 0:a6a169de725f 241 generic_16bit r;
shimniok 0:a6a169de725f 242 r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t))[0];
shimniok 0:a6a169de725f 243 r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t))[1];
shimniok 0:a6a169de725f 244 return (uint16_t)r.s;
shimniok 0:a6a169de725f 245 }
shimniok 0:a6a169de725f 246
shimniok 0:a6a169de725f 247 /**
shimniok 0:a6a169de725f 248 * @brief Get field chan8_raw from rc_channels_override message
shimniok 0:a6a169de725f 249 *
shimniok 0:a6a169de725f 250 * @return RC channel 8 value, in microseconds
shimniok 0:a6a169de725f 251 */
shimniok 0:a6a169de725f 252 static inline uint16_t mavlink_msg_rc_channels_override_get_chan8_raw(const mavlink_message_t* msg)
shimniok 0:a6a169de725f 253 {
shimniok 0:a6a169de725f 254 generic_16bit r;
shimniok 0:a6a169de725f 255 r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t))[0];
shimniok 0:a6a169de725f 256 r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t)+sizeof(uint16_t))[1];
shimniok 0:a6a169de725f 257 return (uint16_t)r.s;
shimniok 0:a6a169de725f 258 }
shimniok 0:a6a169de725f 259
shimniok 0:a6a169de725f 260 /**
shimniok 0:a6a169de725f 261 * @brief Decode a rc_channels_override message into a struct
shimniok 0:a6a169de725f 262 *
shimniok 0:a6a169de725f 263 * @param msg The message to decode
shimniok 0:a6a169de725f 264 * @param rc_channels_override C-struct to decode the message contents into
shimniok 0:a6a169de725f 265 */
shimniok 0:a6a169de725f 266 static inline void mavlink_msg_rc_channels_override_decode(const mavlink_message_t* msg, mavlink_rc_channels_override_t* rc_channels_override)
shimniok 0:a6a169de725f 267 {
shimniok 0:a6a169de725f 268 rc_channels_override->target_system = mavlink_msg_rc_channels_override_get_target_system(msg);
shimniok 0:a6a169de725f 269 rc_channels_override->target_component = mavlink_msg_rc_channels_override_get_target_component(msg);
shimniok 0:a6a169de725f 270 rc_channels_override->chan1_raw = mavlink_msg_rc_channels_override_get_chan1_raw(msg);
shimniok 0:a6a169de725f 271 rc_channels_override->chan2_raw = mavlink_msg_rc_channels_override_get_chan2_raw(msg);
shimniok 0:a6a169de725f 272 rc_channels_override->chan3_raw = mavlink_msg_rc_channels_override_get_chan3_raw(msg);
shimniok 0:a6a169de725f 273 rc_channels_override->chan4_raw = mavlink_msg_rc_channels_override_get_chan4_raw(msg);
shimniok 0:a6a169de725f 274 rc_channels_override->chan5_raw = mavlink_msg_rc_channels_override_get_chan5_raw(msg);
shimniok 0:a6a169de725f 275 rc_channels_override->chan6_raw = mavlink_msg_rc_channels_override_get_chan6_raw(msg);
shimniok 0:a6a169de725f 276 rc_channels_override->chan7_raw = mavlink_msg_rc_channels_override_get_chan7_raw(msg);
shimniok 0:a6a169de725f 277 rc_channels_override->chan8_raw = mavlink_msg_rc_channels_override_get_chan8_raw(msg);
shimniok 0:a6a169de725f 278 }