![](/media/cache/profiles/2012_sf_avc_095.jpg.50x50_q85.jpg)
Code for autonomous ground vehicle, Data Bus, 3rd place winner in 2012 Sparkfun AVC.
Dependencies: Watchdog mbed Schedule SimpleFilter LSM303DLM PinDetect DebounceIn Servo
MAVlink/include/pixhawk/mavlink_msg_attitude_control.h@0:826c6171fc1b, 2012-06-20 (annotated)
- Committer:
- shimniok
- Date:
- Wed Jun 20 14:57:48 2012 +0000
- Revision:
- 0:826c6171fc1b
Updated documentation
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
shimniok | 0:826c6171fc1b | 1 | // MESSAGE ATTITUDE_CONTROL PACKING |
shimniok | 0:826c6171fc1b | 2 | |
shimniok | 0:826c6171fc1b | 3 | #define MAVLINK_MSG_ID_ATTITUDE_CONTROL 85 |
shimniok | 0:826c6171fc1b | 4 | |
shimniok | 0:826c6171fc1b | 5 | typedef struct __mavlink_attitude_control_t |
shimniok | 0:826c6171fc1b | 6 | { |
shimniok | 0:826c6171fc1b | 7 | uint8_t target; ///< The system to be controlled |
shimniok | 0:826c6171fc1b | 8 | float roll; ///< roll |
shimniok | 0:826c6171fc1b | 9 | float pitch; ///< pitch |
shimniok | 0:826c6171fc1b | 10 | float yaw; ///< yaw |
shimniok | 0:826c6171fc1b | 11 | float thrust; ///< thrust |
shimniok | 0:826c6171fc1b | 12 | uint8_t roll_manual; ///< roll control enabled auto:0, manual:1 |
shimniok | 0:826c6171fc1b | 13 | uint8_t pitch_manual; ///< pitch auto:0, manual:1 |
shimniok | 0:826c6171fc1b | 14 | uint8_t yaw_manual; ///< yaw auto:0, manual:1 |
shimniok | 0:826c6171fc1b | 15 | uint8_t thrust_manual; ///< thrust auto:0, manual:1 |
shimniok | 0:826c6171fc1b | 16 | |
shimniok | 0:826c6171fc1b | 17 | } mavlink_attitude_control_t; |
shimniok | 0:826c6171fc1b | 18 | |
shimniok | 0:826c6171fc1b | 19 | |
shimniok | 0:826c6171fc1b | 20 | |
shimniok | 0:826c6171fc1b | 21 | /** |
shimniok | 0:826c6171fc1b | 22 | * @brief Pack a attitude_control message |
shimniok | 0:826c6171fc1b | 23 | * @param system_id ID of this system |
shimniok | 0:826c6171fc1b | 24 | * @param component_id ID of this component (e.g. 200 for IMU) |
shimniok | 0:826c6171fc1b | 25 | * @param msg The MAVLink message to compress the data into |
shimniok | 0:826c6171fc1b | 26 | * |
shimniok | 0:826c6171fc1b | 27 | * @param target The system to be controlled |
shimniok | 0:826c6171fc1b | 28 | * @param roll roll |
shimniok | 0:826c6171fc1b | 29 | * @param pitch pitch |
shimniok | 0:826c6171fc1b | 30 | * @param yaw yaw |
shimniok | 0:826c6171fc1b | 31 | * @param thrust thrust |
shimniok | 0:826c6171fc1b | 32 | * @param roll_manual roll control enabled auto:0, manual:1 |
shimniok | 0:826c6171fc1b | 33 | * @param pitch_manual pitch auto:0, manual:1 |
shimniok | 0:826c6171fc1b | 34 | * @param yaw_manual yaw auto:0, manual:1 |
shimniok | 0:826c6171fc1b | 35 | * @param thrust_manual thrust auto:0, manual:1 |
shimniok | 0:826c6171fc1b | 36 | * @return length of the message in bytes (excluding serial stream start sign) |
shimniok | 0:826c6171fc1b | 37 | */ |
shimniok | 0:826c6171fc1b | 38 | static inline uint16_t mavlink_msg_attitude_control_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, uint8_t target, float roll, float pitch, float yaw, float thrust, uint8_t roll_manual, uint8_t pitch_manual, uint8_t yaw_manual, uint8_t thrust_manual) |
shimniok | 0:826c6171fc1b | 39 | { |
shimniok | 0:826c6171fc1b | 40 | uint16_t i = 0; |
shimniok | 0:826c6171fc1b | 41 | msg->msgid = MAVLINK_MSG_ID_ATTITUDE_CONTROL; |
shimniok | 0:826c6171fc1b | 42 | |
shimniok | 0:826c6171fc1b | 43 | i += put_uint8_t_by_index(target, i, msg->payload); // The system to be controlled |
shimniok | 0:826c6171fc1b | 44 | i += put_float_by_index(roll, i, msg->payload); // roll |
shimniok | 0:826c6171fc1b | 45 | i += put_float_by_index(pitch, i, msg->payload); // pitch |
shimniok | 0:826c6171fc1b | 46 | i += put_float_by_index(yaw, i, msg->payload); // yaw |
shimniok | 0:826c6171fc1b | 47 | i += put_float_by_index(thrust, i, msg->payload); // thrust |
shimniok | 0:826c6171fc1b | 48 | i += put_uint8_t_by_index(roll_manual, i, msg->payload); // roll control enabled auto:0, manual:1 |
shimniok | 0:826c6171fc1b | 49 | i += put_uint8_t_by_index(pitch_manual, i, msg->payload); // pitch auto:0, manual:1 |
shimniok | 0:826c6171fc1b | 50 | i += put_uint8_t_by_index(yaw_manual, i, msg->payload); // yaw auto:0, manual:1 |
shimniok | 0:826c6171fc1b | 51 | i += put_uint8_t_by_index(thrust_manual, i, msg->payload); // thrust auto:0, manual:1 |
shimniok | 0:826c6171fc1b | 52 | |
shimniok | 0:826c6171fc1b | 53 | return mavlink_finalize_message(msg, system_id, component_id, i); |
shimniok | 0:826c6171fc1b | 54 | } |
shimniok | 0:826c6171fc1b | 55 | |
shimniok | 0:826c6171fc1b | 56 | /** |
shimniok | 0:826c6171fc1b | 57 | * @brief Pack a attitude_control message |
shimniok | 0:826c6171fc1b | 58 | * @param system_id ID of this system |
shimniok | 0:826c6171fc1b | 59 | * @param component_id ID of this component (e.g. 200 for IMU) |
shimniok | 0:826c6171fc1b | 60 | * @param chan The MAVLink channel this message was sent over |
shimniok | 0:826c6171fc1b | 61 | * @param msg The MAVLink message to compress the data into |
shimniok | 0:826c6171fc1b | 62 | * @param target The system to be controlled |
shimniok | 0:826c6171fc1b | 63 | * @param roll roll |
shimniok | 0:826c6171fc1b | 64 | * @param pitch pitch |
shimniok | 0:826c6171fc1b | 65 | * @param yaw yaw |
shimniok | 0:826c6171fc1b | 66 | * @param thrust thrust |
shimniok | 0:826c6171fc1b | 67 | * @param roll_manual roll control enabled auto:0, manual:1 |
shimniok | 0:826c6171fc1b | 68 | * @param pitch_manual pitch auto:0, manual:1 |
shimniok | 0:826c6171fc1b | 69 | * @param yaw_manual yaw auto:0, manual:1 |
shimniok | 0:826c6171fc1b | 70 | * @param thrust_manual thrust auto:0, manual:1 |
shimniok | 0:826c6171fc1b | 71 | * @return length of the message in bytes (excluding serial stream start sign) |
shimniok | 0:826c6171fc1b | 72 | */ |
shimniok | 0:826c6171fc1b | 73 | static inline uint16_t mavlink_msg_attitude_control_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, uint8_t target, float roll, float pitch, float yaw, float thrust, uint8_t roll_manual, uint8_t pitch_manual, uint8_t yaw_manual, uint8_t thrust_manual) |
shimniok | 0:826c6171fc1b | 74 | { |
shimniok | 0:826c6171fc1b | 75 | uint16_t i = 0; |
shimniok | 0:826c6171fc1b | 76 | msg->msgid = MAVLINK_MSG_ID_ATTITUDE_CONTROL; |
shimniok | 0:826c6171fc1b | 77 | |
shimniok | 0:826c6171fc1b | 78 | i += put_uint8_t_by_index(target, i, msg->payload); // The system to be controlled |
shimniok | 0:826c6171fc1b | 79 | i += put_float_by_index(roll, i, msg->payload); // roll |
shimniok | 0:826c6171fc1b | 80 | i += put_float_by_index(pitch, i, msg->payload); // pitch |
shimniok | 0:826c6171fc1b | 81 | i += put_float_by_index(yaw, i, msg->payload); // yaw |
shimniok | 0:826c6171fc1b | 82 | i += put_float_by_index(thrust, i, msg->payload); // thrust |
shimniok | 0:826c6171fc1b | 83 | i += put_uint8_t_by_index(roll_manual, i, msg->payload); // roll control enabled auto:0, manual:1 |
shimniok | 0:826c6171fc1b | 84 | i += put_uint8_t_by_index(pitch_manual, i, msg->payload); // pitch auto:0, manual:1 |
shimniok | 0:826c6171fc1b | 85 | i += put_uint8_t_by_index(yaw_manual, i, msg->payload); // yaw auto:0, manual:1 |
shimniok | 0:826c6171fc1b | 86 | i += put_uint8_t_by_index(thrust_manual, i, msg->payload); // thrust auto:0, manual:1 |
shimniok | 0:826c6171fc1b | 87 | |
shimniok | 0:826c6171fc1b | 88 | return mavlink_finalize_message_chan(msg, system_id, component_id, chan, i); |
shimniok | 0:826c6171fc1b | 89 | } |
shimniok | 0:826c6171fc1b | 90 | |
shimniok | 0:826c6171fc1b | 91 | /** |
shimniok | 0:826c6171fc1b | 92 | * @brief Encode a attitude_control struct into a message |
shimniok | 0:826c6171fc1b | 93 | * |
shimniok | 0:826c6171fc1b | 94 | * @param system_id ID of this system |
shimniok | 0:826c6171fc1b | 95 | * @param component_id ID of this component (e.g. 200 for IMU) |
shimniok | 0:826c6171fc1b | 96 | * @param msg The MAVLink message to compress the data into |
shimniok | 0:826c6171fc1b | 97 | * @param attitude_control C-struct to read the message contents from |
shimniok | 0:826c6171fc1b | 98 | */ |
shimniok | 0:826c6171fc1b | 99 | static inline uint16_t mavlink_msg_attitude_control_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_attitude_control_t* attitude_control) |
shimniok | 0:826c6171fc1b | 100 | { |
shimniok | 0:826c6171fc1b | 101 | return mavlink_msg_attitude_control_pack(system_id, component_id, msg, attitude_control->target, attitude_control->roll, attitude_control->pitch, attitude_control->yaw, attitude_control->thrust, attitude_control->roll_manual, attitude_control->pitch_manual, attitude_control->yaw_manual, attitude_control->thrust_manual); |
shimniok | 0:826c6171fc1b | 102 | } |
shimniok | 0:826c6171fc1b | 103 | |
shimniok | 0:826c6171fc1b | 104 | /** |
shimniok | 0:826c6171fc1b | 105 | * @brief Send a attitude_control message |
shimniok | 0:826c6171fc1b | 106 | * @param chan MAVLink channel to send the message |
shimniok | 0:826c6171fc1b | 107 | * |
shimniok | 0:826c6171fc1b | 108 | * @param target The system to be controlled |
shimniok | 0:826c6171fc1b | 109 | * @param roll roll |
shimniok | 0:826c6171fc1b | 110 | * @param pitch pitch |
shimniok | 0:826c6171fc1b | 111 | * @param yaw yaw |
shimniok | 0:826c6171fc1b | 112 | * @param thrust thrust |
shimniok | 0:826c6171fc1b | 113 | * @param roll_manual roll control enabled auto:0, manual:1 |
shimniok | 0:826c6171fc1b | 114 | * @param pitch_manual pitch auto:0, manual:1 |
shimniok | 0:826c6171fc1b | 115 | * @param yaw_manual yaw auto:0, manual:1 |
shimniok | 0:826c6171fc1b | 116 | * @param thrust_manual thrust auto:0, manual:1 |
shimniok | 0:826c6171fc1b | 117 | */ |
shimniok | 0:826c6171fc1b | 118 | #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS |
shimniok | 0:826c6171fc1b | 119 | |
shimniok | 0:826c6171fc1b | 120 | static inline void mavlink_msg_attitude_control_send(mavlink_channel_t chan, uint8_t target, float roll, float pitch, float yaw, float thrust, uint8_t roll_manual, uint8_t pitch_manual, uint8_t yaw_manual, uint8_t thrust_manual) |
shimniok | 0:826c6171fc1b | 121 | { |
shimniok | 0:826c6171fc1b | 122 | mavlink_message_t msg; |
shimniok | 0:826c6171fc1b | 123 | mavlink_msg_attitude_control_pack_chan(mavlink_system.sysid, mavlink_system.compid, chan, &msg, target, roll, pitch, yaw, thrust, roll_manual, pitch_manual, yaw_manual, thrust_manual); |
shimniok | 0:826c6171fc1b | 124 | mavlink_send_uart(chan, &msg); |
shimniok | 0:826c6171fc1b | 125 | } |
shimniok | 0:826c6171fc1b | 126 | |
shimniok | 0:826c6171fc1b | 127 | #endif |
shimniok | 0:826c6171fc1b | 128 | // MESSAGE ATTITUDE_CONTROL UNPACKING |
shimniok | 0:826c6171fc1b | 129 | |
shimniok | 0:826c6171fc1b | 130 | /** |
shimniok | 0:826c6171fc1b | 131 | * @brief Get field target from attitude_control message |
shimniok | 0:826c6171fc1b | 132 | * |
shimniok | 0:826c6171fc1b | 133 | * @return The system to be controlled |
shimniok | 0:826c6171fc1b | 134 | */ |
shimniok | 0:826c6171fc1b | 135 | static inline uint8_t mavlink_msg_attitude_control_get_target(const mavlink_message_t* msg) |
shimniok | 0:826c6171fc1b | 136 | { |
shimniok | 0:826c6171fc1b | 137 | return (uint8_t)(msg->payload)[0]; |
shimniok | 0:826c6171fc1b | 138 | } |
shimniok | 0:826c6171fc1b | 139 | |
shimniok | 0:826c6171fc1b | 140 | /** |
shimniok | 0:826c6171fc1b | 141 | * @brief Get field roll from attitude_control message |
shimniok | 0:826c6171fc1b | 142 | * |
shimniok | 0:826c6171fc1b | 143 | * @return roll |
shimniok | 0:826c6171fc1b | 144 | */ |
shimniok | 0:826c6171fc1b | 145 | static inline float mavlink_msg_attitude_control_get_roll(const mavlink_message_t* msg) |
shimniok | 0:826c6171fc1b | 146 | { |
shimniok | 0:826c6171fc1b | 147 | generic_32bit r; |
shimniok | 0:826c6171fc1b | 148 | r.b[3] = (msg->payload+sizeof(uint8_t))[0]; |
shimniok | 0:826c6171fc1b | 149 | r.b[2] = (msg->payload+sizeof(uint8_t))[1]; |
shimniok | 0:826c6171fc1b | 150 | r.b[1] = (msg->payload+sizeof(uint8_t))[2]; |
shimniok | 0:826c6171fc1b | 151 | r.b[0] = (msg->payload+sizeof(uint8_t))[3]; |
shimniok | 0:826c6171fc1b | 152 | return (float)r.f; |
shimniok | 0:826c6171fc1b | 153 | } |
shimniok | 0:826c6171fc1b | 154 | |
shimniok | 0:826c6171fc1b | 155 | /** |
shimniok | 0:826c6171fc1b | 156 | * @brief Get field pitch from attitude_control message |
shimniok | 0:826c6171fc1b | 157 | * |
shimniok | 0:826c6171fc1b | 158 | * @return pitch |
shimniok | 0:826c6171fc1b | 159 | */ |
shimniok | 0:826c6171fc1b | 160 | static inline float mavlink_msg_attitude_control_get_pitch(const mavlink_message_t* msg) |
shimniok | 0:826c6171fc1b | 161 | { |
shimniok | 0:826c6171fc1b | 162 | generic_32bit r; |
shimniok | 0:826c6171fc1b | 163 | r.b[3] = (msg->payload+sizeof(uint8_t)+sizeof(float))[0]; |
shimniok | 0:826c6171fc1b | 164 | r.b[2] = (msg->payload+sizeof(uint8_t)+sizeof(float))[1]; |
shimniok | 0:826c6171fc1b | 165 | r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(float))[2]; |
shimniok | 0:826c6171fc1b | 166 | r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(float))[3]; |
shimniok | 0:826c6171fc1b | 167 | return (float)r.f; |
shimniok | 0:826c6171fc1b | 168 | } |
shimniok | 0:826c6171fc1b | 169 | |
shimniok | 0:826c6171fc1b | 170 | /** |
shimniok | 0:826c6171fc1b | 171 | * @brief Get field yaw from attitude_control message |
shimniok | 0:826c6171fc1b | 172 | * |
shimniok | 0:826c6171fc1b | 173 | * @return yaw |
shimniok | 0:826c6171fc1b | 174 | */ |
shimniok | 0:826c6171fc1b | 175 | static inline float mavlink_msg_attitude_control_get_yaw(const mavlink_message_t* msg) |
shimniok | 0:826c6171fc1b | 176 | { |
shimniok | 0:826c6171fc1b | 177 | generic_32bit r; |
shimniok | 0:826c6171fc1b | 178 | r.b[3] = (msg->payload+sizeof(uint8_t)+sizeof(float)+sizeof(float))[0]; |
shimniok | 0:826c6171fc1b | 179 | r.b[2] = (msg->payload+sizeof(uint8_t)+sizeof(float)+sizeof(float))[1]; |
shimniok | 0:826c6171fc1b | 180 | r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(float)+sizeof(float))[2]; |
shimniok | 0:826c6171fc1b | 181 | r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(float)+sizeof(float))[3]; |
shimniok | 0:826c6171fc1b | 182 | return (float)r.f; |
shimniok | 0:826c6171fc1b | 183 | } |
shimniok | 0:826c6171fc1b | 184 | |
shimniok | 0:826c6171fc1b | 185 | /** |
shimniok | 0:826c6171fc1b | 186 | * @brief Get field thrust from attitude_control message |
shimniok | 0:826c6171fc1b | 187 | * |
shimniok | 0:826c6171fc1b | 188 | * @return thrust |
shimniok | 0:826c6171fc1b | 189 | */ |
shimniok | 0:826c6171fc1b | 190 | static inline float mavlink_msg_attitude_control_get_thrust(const mavlink_message_t* msg) |
shimniok | 0:826c6171fc1b | 191 | { |
shimniok | 0:826c6171fc1b | 192 | generic_32bit r; |
shimniok | 0:826c6171fc1b | 193 | r.b[3] = (msg->payload+sizeof(uint8_t)+sizeof(float)+sizeof(float)+sizeof(float))[0]; |
shimniok | 0:826c6171fc1b | 194 | r.b[2] = (msg->payload+sizeof(uint8_t)+sizeof(float)+sizeof(float)+sizeof(float))[1]; |
shimniok | 0:826c6171fc1b | 195 | r.b[1] = (msg->payload+sizeof(uint8_t)+sizeof(float)+sizeof(float)+sizeof(float))[2]; |
shimniok | 0:826c6171fc1b | 196 | r.b[0] = (msg->payload+sizeof(uint8_t)+sizeof(float)+sizeof(float)+sizeof(float))[3]; |
shimniok | 0:826c6171fc1b | 197 | return (float)r.f; |
shimniok | 0:826c6171fc1b | 198 | } |
shimniok | 0:826c6171fc1b | 199 | |
shimniok | 0:826c6171fc1b | 200 | /** |
shimniok | 0:826c6171fc1b | 201 | * @brief Get field roll_manual from attitude_control message |
shimniok | 0:826c6171fc1b | 202 | * |
shimniok | 0:826c6171fc1b | 203 | * @return roll control enabled auto:0, manual:1 |
shimniok | 0:826c6171fc1b | 204 | */ |
shimniok | 0:826c6171fc1b | 205 | static inline uint8_t mavlink_msg_attitude_control_get_roll_manual(const mavlink_message_t* msg) |
shimniok | 0:826c6171fc1b | 206 | { |
shimniok | 0:826c6171fc1b | 207 | return (uint8_t)(msg->payload+sizeof(uint8_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float))[0]; |
shimniok | 0:826c6171fc1b | 208 | } |
shimniok | 0:826c6171fc1b | 209 | |
shimniok | 0:826c6171fc1b | 210 | /** |
shimniok | 0:826c6171fc1b | 211 | * @brief Get field pitch_manual from attitude_control message |
shimniok | 0:826c6171fc1b | 212 | * |
shimniok | 0:826c6171fc1b | 213 | * @return pitch auto:0, manual:1 |
shimniok | 0:826c6171fc1b | 214 | */ |
shimniok | 0:826c6171fc1b | 215 | static inline uint8_t mavlink_msg_attitude_control_get_pitch_manual(const mavlink_message_t* msg) |
shimniok | 0:826c6171fc1b | 216 | { |
shimniok | 0:826c6171fc1b | 217 | return (uint8_t)(msg->payload+sizeof(uint8_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(uint8_t))[0]; |
shimniok | 0:826c6171fc1b | 218 | } |
shimniok | 0:826c6171fc1b | 219 | |
shimniok | 0:826c6171fc1b | 220 | /** |
shimniok | 0:826c6171fc1b | 221 | * @brief Get field yaw_manual from attitude_control message |
shimniok | 0:826c6171fc1b | 222 | * |
shimniok | 0:826c6171fc1b | 223 | * @return yaw auto:0, manual:1 |
shimniok | 0:826c6171fc1b | 224 | */ |
shimniok | 0:826c6171fc1b | 225 | static inline uint8_t mavlink_msg_attitude_control_get_yaw_manual(const mavlink_message_t* msg) |
shimniok | 0:826c6171fc1b | 226 | { |
shimniok | 0:826c6171fc1b | 227 | return (uint8_t)(msg->payload+sizeof(uint8_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(uint8_t)+sizeof(uint8_t))[0]; |
shimniok | 0:826c6171fc1b | 228 | } |
shimniok | 0:826c6171fc1b | 229 | |
shimniok | 0:826c6171fc1b | 230 | /** |
shimniok | 0:826c6171fc1b | 231 | * @brief Get field thrust_manual from attitude_control message |
shimniok | 0:826c6171fc1b | 232 | * |
shimniok | 0:826c6171fc1b | 233 | * @return thrust auto:0, manual:1 |
shimniok | 0:826c6171fc1b | 234 | */ |
shimniok | 0:826c6171fc1b | 235 | static inline uint8_t mavlink_msg_attitude_control_get_thrust_manual(const mavlink_message_t* msg) |
shimniok | 0:826c6171fc1b | 236 | { |
shimniok | 0:826c6171fc1b | 237 | return (uint8_t)(msg->payload+sizeof(uint8_t)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(float)+sizeof(uint8_t)+sizeof(uint8_t)+sizeof(uint8_t))[0]; |
shimniok | 0:826c6171fc1b | 238 | } |
shimniok | 0:826c6171fc1b | 239 | |
shimniok | 0:826c6171fc1b | 240 | /** |
shimniok | 0:826c6171fc1b | 241 | * @brief Decode a attitude_control message into a struct |
shimniok | 0:826c6171fc1b | 242 | * |
shimniok | 0:826c6171fc1b | 243 | * @param msg The message to decode |
shimniok | 0:826c6171fc1b | 244 | * @param attitude_control C-struct to decode the message contents into |
shimniok | 0:826c6171fc1b | 245 | */ |
shimniok | 0:826c6171fc1b | 246 | static inline void mavlink_msg_attitude_control_decode(const mavlink_message_t* msg, mavlink_attitude_control_t* attitude_control) |
shimniok | 0:826c6171fc1b | 247 | { |
shimniok | 0:826c6171fc1b | 248 | attitude_control->target = mavlink_msg_attitude_control_get_target(msg); |
shimniok | 0:826c6171fc1b | 249 | attitude_control->roll = mavlink_msg_attitude_control_get_roll(msg); |
shimniok | 0:826c6171fc1b | 250 | attitude_control->pitch = mavlink_msg_attitude_control_get_pitch(msg); |
shimniok | 0:826c6171fc1b | 251 | attitude_control->yaw = mavlink_msg_attitude_control_get_yaw(msg); |
shimniok | 0:826c6171fc1b | 252 | attitude_control->thrust = mavlink_msg_attitude_control_get_thrust(msg); |
shimniok | 0:826c6171fc1b | 253 | attitude_control->roll_manual = mavlink_msg_attitude_control_get_roll_manual(msg); |
shimniok | 0:826c6171fc1b | 254 | attitude_control->pitch_manual = mavlink_msg_attitude_control_get_pitch_manual(msg); |
shimniok | 0:826c6171fc1b | 255 | attitude_control->yaw_manual = mavlink_msg_attitude_control_get_yaw_manual(msg); |
shimniok | 0:826c6171fc1b | 256 | attitude_control->thrust_manual = mavlink_msg_attitude_control_get_thrust_manual(msg); |
shimniok | 0:826c6171fc1b | 257 | } |