mavlink_msg_vk_fixedwing_control_value.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396
  1. #pragma once
  2. // MESSAGE VK_FIXEDWING_CONTROL_VALUE PACKING
  3. #define MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE 53009
  4. typedef struct __mavlink_vk_fixedwing_control_value_t {
  5. uint32_t timestamp; /*< [ms] Timestamp from system boot.*/
  6. float roll_value; /*< Roll control value,
  7. negative value means roll left.*/
  8. float pitch_value; /*< Pitch control value,
  9. negative value means pitch down.*/
  10. float throttle_value; /*< Throttle control
  11. value, negative value means throttle off*/
  12. float yaw_value; /*< Throttle control
  13. value, negative value means turn left*/
  14. } mavlink_vk_fixedwing_control_value_t;
  15. #define MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_LEN 20
  16. #define MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_MIN_LEN 20
  17. #define MAVLINK_MSG_ID_53009_LEN 20
  18. #define MAVLINK_MSG_ID_53009_MIN_LEN 20
  19. #define MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_CRC 226
  20. #define MAVLINK_MSG_ID_53009_CRC 226
  21. #if MAVLINK_COMMAND_24BIT
  22. #define MAVLINK_MESSAGE_INFO_VK_FIXEDWING_CONTROL_VALUE { \
  23. 53009, \
  24. "VK_FIXEDWING_CONTROL_VALUE", \
  25. 5, \
  26. { { "timestamp", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_vk_fixedwing_control_value_t, timestamp) }, \
  27. { "roll_value", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_vk_fixedwing_control_value_t, roll_value) }, \
  28. { "pitch_value", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_vk_fixedwing_control_value_t, pitch_value) }, \
  29. { "throttle_value", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_vk_fixedwing_control_value_t, throttle_value) }, \
  30. { "yaw_value", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_vk_fixedwing_control_value_t, yaw_value) }, \
  31. } \
  32. }
  33. #else
  34. #define MAVLINK_MESSAGE_INFO_VK_FIXEDWING_CONTROL_VALUE { \
  35. "VK_FIXEDWING_CONTROL_VALUE", \
  36. 5, \
  37. { { "timestamp", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_vk_fixedwing_control_value_t, timestamp) }, \
  38. { "roll_value", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_vk_fixedwing_control_value_t, roll_value) }, \
  39. { "pitch_value", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_vk_fixedwing_control_value_t, pitch_value) }, \
  40. { "throttle_value", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_vk_fixedwing_control_value_t, throttle_value) }, \
  41. { "yaw_value", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_vk_fixedwing_control_value_t, yaw_value) }, \
  42. } \
  43. }
  44. #endif
  45. /**
  46. * @brief Pack a vk_fixedwing_control_value message
  47. * @param system_id ID of this system
  48. * @param component_id ID of this component (e.g. 200 for IMU)
  49. * @param msg The MAVLink message to compress the data into
  50. *
  51. * @param timestamp [ms] Timestamp from system boot.
  52. * @param roll_value Roll control value,
  53. negative value means roll left.
  54. * @param pitch_value Pitch control value,
  55. negative value means pitch down.
  56. * @param throttle_value Throttle control
  57. value, negative value means throttle off
  58. * @param yaw_value Throttle control
  59. value, negative value means turn left
  60. * @return length of the message in bytes (excluding serial stream start sign)
  61. */
  62. static inline uint16_t mavlink_msg_vk_fixedwing_control_value_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
  63. uint32_t timestamp, float roll_value, float pitch_value, float throttle_value, float yaw_value)
  64. {
  65. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  66. char buf[MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_LEN];
  67. _mav_put_uint32_t(buf, 0, timestamp);
  68. _mav_put_float(buf, 4, roll_value);
  69. _mav_put_float(buf, 8, pitch_value);
  70. _mav_put_float(buf, 12, throttle_value);
  71. _mav_put_float(buf, 16, yaw_value);
  72. memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_LEN);
  73. #else
  74. mavlink_vk_fixedwing_control_value_t packet;
  75. packet.timestamp = timestamp;
  76. packet.roll_value = roll_value;
  77. packet.pitch_value = pitch_value;
  78. packet.throttle_value = throttle_value;
  79. packet.yaw_value = yaw_value;
  80. memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_LEN);
  81. #endif
  82. msg->msgid = MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE;
  83. return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_MIN_LEN, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_LEN, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_CRC);
  84. }
  85. /**
  86. * @brief Pack a vk_fixedwing_control_value message
  87. * @param system_id ID of this system
  88. * @param component_id ID of this component (e.g. 200 for IMU)
  89. * @param status MAVLink status structure
  90. * @param msg The MAVLink message to compress the data into
  91. *
  92. * @param timestamp [ms] Timestamp from system boot.
  93. * @param roll_value Roll control value,
  94. negative value means roll left.
  95. * @param pitch_value Pitch control value,
  96. negative value means pitch down.
  97. * @param throttle_value Throttle control
  98. value, negative value means throttle off
  99. * @param yaw_value Throttle control
  100. value, negative value means turn left
  101. * @return length of the message in bytes (excluding serial stream start sign)
  102. */
  103. static inline uint16_t mavlink_msg_vk_fixedwing_control_value_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
  104. uint32_t timestamp, float roll_value, float pitch_value, float throttle_value, float yaw_value)
  105. {
  106. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  107. char buf[MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_LEN];
  108. _mav_put_uint32_t(buf, 0, timestamp);
  109. _mav_put_float(buf, 4, roll_value);
  110. _mav_put_float(buf, 8, pitch_value);
  111. _mav_put_float(buf, 12, throttle_value);
  112. _mav_put_float(buf, 16, yaw_value);
  113. memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_LEN);
  114. #else
  115. mavlink_vk_fixedwing_control_value_t packet;
  116. packet.timestamp = timestamp;
  117. packet.roll_value = roll_value;
  118. packet.pitch_value = pitch_value;
  119. packet.throttle_value = throttle_value;
  120. packet.yaw_value = yaw_value;
  121. memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_LEN);
  122. #endif
  123. msg->msgid = MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE;
  124. #if MAVLINK_CRC_EXTRA
  125. return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_MIN_LEN, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_LEN, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_CRC);
  126. #else
  127. return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_MIN_LEN, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_LEN);
  128. #endif
  129. }
  130. /**
  131. * @brief Pack a vk_fixedwing_control_value message on a channel
  132. * @param system_id ID of this system
  133. * @param component_id ID of this component (e.g. 200 for IMU)
  134. * @param chan The MAVLink channel this message will be sent over
  135. * @param msg The MAVLink message to compress the data into
  136. * @param timestamp [ms] Timestamp from system boot.
  137. * @param roll_value Roll control value,
  138. negative value means roll left.
  139. * @param pitch_value Pitch control value,
  140. negative value means pitch down.
  141. * @param throttle_value Throttle control
  142. value, negative value means throttle off
  143. * @param yaw_value Throttle control
  144. value, negative value means turn left
  145. * @return length of the message in bytes (excluding serial stream start sign)
  146. */
  147. static inline uint16_t mavlink_msg_vk_fixedwing_control_value_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
  148. mavlink_message_t* msg,
  149. uint32_t timestamp,float roll_value,float pitch_value,float throttle_value,float yaw_value)
  150. {
  151. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  152. char buf[MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_LEN];
  153. _mav_put_uint32_t(buf, 0, timestamp);
  154. _mav_put_float(buf, 4, roll_value);
  155. _mav_put_float(buf, 8, pitch_value);
  156. _mav_put_float(buf, 12, throttle_value);
  157. _mav_put_float(buf, 16, yaw_value);
  158. memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_LEN);
  159. #else
  160. mavlink_vk_fixedwing_control_value_t packet;
  161. packet.timestamp = timestamp;
  162. packet.roll_value = roll_value;
  163. packet.pitch_value = pitch_value;
  164. packet.throttle_value = throttle_value;
  165. packet.yaw_value = yaw_value;
  166. memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_LEN);
  167. #endif
  168. msg->msgid = MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE;
  169. return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_MIN_LEN, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_LEN, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_CRC);
  170. }
  171. /**
  172. * @brief Encode a vk_fixedwing_control_value struct
  173. *
  174. * @param system_id ID of this system
  175. * @param component_id ID of this component (e.g. 200 for IMU)
  176. * @param msg The MAVLink message to compress the data into
  177. * @param vk_fixedwing_control_value C-struct to read the message contents from
  178. */
  179. static inline uint16_t mavlink_msg_vk_fixedwing_control_value_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_vk_fixedwing_control_value_t* vk_fixedwing_control_value)
  180. {
  181. return mavlink_msg_vk_fixedwing_control_value_pack(system_id, component_id, msg, vk_fixedwing_control_value->timestamp, vk_fixedwing_control_value->roll_value, vk_fixedwing_control_value->pitch_value, vk_fixedwing_control_value->throttle_value, vk_fixedwing_control_value->yaw_value);
  182. }
  183. /**
  184. * @brief Encode a vk_fixedwing_control_value struct on a channel
  185. *
  186. * @param system_id ID of this system
  187. * @param component_id ID of this component (e.g. 200 for IMU)
  188. * @param chan The MAVLink channel this message will be sent over
  189. * @param msg The MAVLink message to compress the data into
  190. * @param vk_fixedwing_control_value C-struct to read the message contents from
  191. */
  192. static inline uint16_t mavlink_msg_vk_fixedwing_control_value_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_vk_fixedwing_control_value_t* vk_fixedwing_control_value)
  193. {
  194. return mavlink_msg_vk_fixedwing_control_value_pack_chan(system_id, component_id, chan, msg, vk_fixedwing_control_value->timestamp, vk_fixedwing_control_value->roll_value, vk_fixedwing_control_value->pitch_value, vk_fixedwing_control_value->throttle_value, vk_fixedwing_control_value->yaw_value);
  195. }
  196. /**
  197. * @brief Encode a vk_fixedwing_control_value struct with provided status structure
  198. *
  199. * @param system_id ID of this system
  200. * @param component_id ID of this component (e.g. 200 for IMU)
  201. * @param status MAVLink status structure
  202. * @param msg The MAVLink message to compress the data into
  203. * @param vk_fixedwing_control_value C-struct to read the message contents from
  204. */
  205. static inline uint16_t mavlink_msg_vk_fixedwing_control_value_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_vk_fixedwing_control_value_t* vk_fixedwing_control_value)
  206. {
  207. return mavlink_msg_vk_fixedwing_control_value_pack_status(system_id, component_id, _status, msg, vk_fixedwing_control_value->timestamp, vk_fixedwing_control_value->roll_value, vk_fixedwing_control_value->pitch_value, vk_fixedwing_control_value->throttle_value, vk_fixedwing_control_value->yaw_value);
  208. }
  209. /**
  210. * @brief Send a vk_fixedwing_control_value message
  211. * @param chan MAVLink channel to send the message
  212. *
  213. * @param timestamp [ms] Timestamp from system boot.
  214. * @param roll_value Roll control value,
  215. negative value means roll left.
  216. * @param pitch_value Pitch control value,
  217. negative value means pitch down.
  218. * @param throttle_value Throttle control
  219. value, negative value means throttle off
  220. * @param yaw_value Throttle control
  221. value, negative value means turn left
  222. */
  223. #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
  224. static inline void mavlink_msg_vk_fixedwing_control_value_send(mavlink_channel_t chan, uint32_t timestamp, float roll_value, float pitch_value, float throttle_value, float yaw_value)
  225. {
  226. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  227. char buf[MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_LEN];
  228. _mav_put_uint32_t(buf, 0, timestamp);
  229. _mav_put_float(buf, 4, roll_value);
  230. _mav_put_float(buf, 8, pitch_value);
  231. _mav_put_float(buf, 12, throttle_value);
  232. _mav_put_float(buf, 16, yaw_value);
  233. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE, buf, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_MIN_LEN, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_LEN, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_CRC);
  234. #else
  235. mavlink_vk_fixedwing_control_value_t packet;
  236. packet.timestamp = timestamp;
  237. packet.roll_value = roll_value;
  238. packet.pitch_value = pitch_value;
  239. packet.throttle_value = throttle_value;
  240. packet.yaw_value = yaw_value;
  241. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE, (const char *)&packet, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_MIN_LEN, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_LEN, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_CRC);
  242. #endif
  243. }
  244. /**
  245. * @brief Send a vk_fixedwing_control_value message
  246. * @param chan MAVLink channel to send the message
  247. * @param struct The MAVLink struct to serialize
  248. */
  249. static inline void mavlink_msg_vk_fixedwing_control_value_send_struct(mavlink_channel_t chan, const mavlink_vk_fixedwing_control_value_t* vk_fixedwing_control_value)
  250. {
  251. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  252. mavlink_msg_vk_fixedwing_control_value_send(chan, vk_fixedwing_control_value->timestamp, vk_fixedwing_control_value->roll_value, vk_fixedwing_control_value->pitch_value, vk_fixedwing_control_value->throttle_value, vk_fixedwing_control_value->yaw_value);
  253. #else
  254. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE, (const char *)vk_fixedwing_control_value, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_MIN_LEN, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_LEN, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_CRC);
  255. #endif
  256. }
  257. #if MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_LEN <= MAVLINK_MAX_PAYLOAD_LEN
  258. /*
  259. This variant of _send() can be used to save stack space by re-using
  260. memory from the receive buffer. The caller provides a
  261. mavlink_message_t which is the size of a full mavlink message. This
  262. is usually the receive buffer for the channel, and allows a reply to an
  263. incoming message with minimum stack space usage.
  264. */
  265. static inline void mavlink_msg_vk_fixedwing_control_value_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t timestamp, float roll_value, float pitch_value, float throttle_value, float yaw_value)
  266. {
  267. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  268. char *buf = (char *)msgbuf;
  269. _mav_put_uint32_t(buf, 0, timestamp);
  270. _mav_put_float(buf, 4, roll_value);
  271. _mav_put_float(buf, 8, pitch_value);
  272. _mav_put_float(buf, 12, throttle_value);
  273. _mav_put_float(buf, 16, yaw_value);
  274. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE, buf, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_MIN_LEN, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_LEN, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_CRC);
  275. #else
  276. mavlink_vk_fixedwing_control_value_t *packet = (mavlink_vk_fixedwing_control_value_t *)msgbuf;
  277. packet->timestamp = timestamp;
  278. packet->roll_value = roll_value;
  279. packet->pitch_value = pitch_value;
  280. packet->throttle_value = throttle_value;
  281. packet->yaw_value = yaw_value;
  282. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE, (const char *)packet, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_MIN_LEN, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_LEN, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_CRC);
  283. #endif
  284. }
  285. #endif
  286. #endif
  287. // MESSAGE VK_FIXEDWING_CONTROL_VALUE UNPACKING
  288. /**
  289. * @brief Get field timestamp from vk_fixedwing_control_value message
  290. *
  291. * @return [ms] Timestamp from system boot.
  292. */
  293. static inline uint32_t mavlink_msg_vk_fixedwing_control_value_get_timestamp(const mavlink_message_t* msg)
  294. {
  295. return _MAV_RETURN_uint32_t(msg, 0);
  296. }
  297. /**
  298. * @brief Get field roll_value from vk_fixedwing_control_value message
  299. *
  300. * @return Roll control value,
  301. negative value means roll left.
  302. */
  303. static inline float mavlink_msg_vk_fixedwing_control_value_get_roll_value(const mavlink_message_t* msg)
  304. {
  305. return _MAV_RETURN_float(msg, 4);
  306. }
  307. /**
  308. * @brief Get field pitch_value from vk_fixedwing_control_value message
  309. *
  310. * @return Pitch control value,
  311. negative value means pitch down.
  312. */
  313. static inline float mavlink_msg_vk_fixedwing_control_value_get_pitch_value(const mavlink_message_t* msg)
  314. {
  315. return _MAV_RETURN_float(msg, 8);
  316. }
  317. /**
  318. * @brief Get field throttle_value from vk_fixedwing_control_value message
  319. *
  320. * @return Throttle control
  321. value, negative value means throttle off
  322. */
  323. static inline float mavlink_msg_vk_fixedwing_control_value_get_throttle_value(const mavlink_message_t* msg)
  324. {
  325. return _MAV_RETURN_float(msg, 12);
  326. }
  327. /**
  328. * @brief Get field yaw_value from vk_fixedwing_control_value message
  329. *
  330. * @return Throttle control
  331. value, negative value means turn left
  332. */
  333. static inline float mavlink_msg_vk_fixedwing_control_value_get_yaw_value(const mavlink_message_t* msg)
  334. {
  335. return _MAV_RETURN_float(msg, 16);
  336. }
  337. /**
  338. * @brief Decode a vk_fixedwing_control_value message into a struct
  339. *
  340. * @param msg The message to decode
  341. * @param vk_fixedwing_control_value C-struct to decode the message contents into
  342. */
  343. static inline void mavlink_msg_vk_fixedwing_control_value_decode(const mavlink_message_t* msg, mavlink_vk_fixedwing_control_value_t* vk_fixedwing_control_value)
  344. {
  345. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  346. vk_fixedwing_control_value->timestamp = mavlink_msg_vk_fixedwing_control_value_get_timestamp(msg);
  347. vk_fixedwing_control_value->roll_value = mavlink_msg_vk_fixedwing_control_value_get_roll_value(msg);
  348. vk_fixedwing_control_value->pitch_value = mavlink_msg_vk_fixedwing_control_value_get_pitch_value(msg);
  349. vk_fixedwing_control_value->throttle_value = mavlink_msg_vk_fixedwing_control_value_get_throttle_value(msg);
  350. vk_fixedwing_control_value->yaw_value = mavlink_msg_vk_fixedwing_control_value_get_yaw_value(msg);
  351. #else
  352. uint8_t len = msg->len < MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_LEN? msg->len : MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_LEN;
  353. memset(vk_fixedwing_control_value, 0, MAVLINK_MSG_ID_VK_FIXEDWING_CONTROL_VALUE_LEN);
  354. memcpy(vk_fixedwing_control_value, _MAV_PAYLOAD(msg), len);
  355. #endif
  356. }