4#define MAVLINK_MSG_ID_MOUNT_ORIENTATION 265
7typedef struct __mavlink_mount_orientation_t {
12}) mavlink_mount_orientation_t;
14#define MAVLINK_MSG_ID_MOUNT_ORIENTATION_LEN 16
15#define MAVLINK_MSG_ID_MOUNT_ORIENTATION_MIN_LEN 16
16#define MAVLINK_MSG_ID_265_LEN 16
17#define MAVLINK_MSG_ID_265_MIN_LEN 16
19#define MAVLINK_MSG_ID_MOUNT_ORIENTATION_CRC 26
20#define MAVLINK_MSG_ID_265_CRC 26
24#if MAVLINK_COMMAND_24BIT
25#define MAVLINK_MESSAGE_INFO_MOUNT_ORIENTATION { \
27 "MOUNT_ORIENTATION", \
29 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_mount_orientation_t, time_boot_ms) }, \
30 { "roll", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_mount_orientation_t, roll) }, \
31 { "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_mount_orientation_t, pitch) }, \
32 { "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_mount_orientation_t, yaw) }, \
36#define MAVLINK_MESSAGE_INFO_MOUNT_ORIENTATION { \
37 "MOUNT_ORIENTATION", \
39 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_mount_orientation_t, time_boot_ms) }, \
40 { "roll", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_mount_orientation_t, roll) }, \
41 { "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_mount_orientation_t, pitch) }, \
42 { "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_mount_orientation_t, yaw) }, \
59static inline uint16_t mavlink_msg_mount_orientation_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
60 uint32_t time_boot_ms,
float roll,
float pitch,
float yaw)
62#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
63 char buf[MAVLINK_MSG_ID_MOUNT_ORIENTATION_LEN];
64 _mav_put_uint32_t(buf, 0, time_boot_ms);
65 _mav_put_float(buf, 4, roll);
66 _mav_put_float(buf, 8, pitch);
67 _mav_put_float(buf, 12, yaw);
69 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MOUNT_ORIENTATION_LEN);
71 mavlink_mount_orientation_t packet;
72 packet.time_boot_ms = time_boot_ms;
77 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MOUNT_ORIENTATION_LEN);
80 msg->msgid = MAVLINK_MSG_ID_MOUNT_ORIENTATION;
81 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MOUNT_ORIENTATION_MIN_LEN, MAVLINK_MSG_ID_MOUNT_ORIENTATION_LEN, MAVLINK_MSG_ID_MOUNT_ORIENTATION_CRC);
96static inline uint16_t mavlink_msg_mount_orientation_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
97 mavlink_message_t* msg,
98 uint32_t time_boot_ms,
float roll,
float pitch,
float yaw)
100#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
101 char buf[MAVLINK_MSG_ID_MOUNT_ORIENTATION_LEN];
102 _mav_put_uint32_t(buf, 0, time_boot_ms);
103 _mav_put_float(buf, 4, roll);
104 _mav_put_float(buf, 8, pitch);
105 _mav_put_float(buf, 12, yaw);
107 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MOUNT_ORIENTATION_LEN);
109 mavlink_mount_orientation_t packet;
110 packet.time_boot_ms = time_boot_ms;
112 packet.pitch = pitch;
115 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MOUNT_ORIENTATION_LEN);
118 msg->msgid = MAVLINK_MSG_ID_MOUNT_ORIENTATION;
119 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MOUNT_ORIENTATION_MIN_LEN, MAVLINK_MSG_ID_MOUNT_ORIENTATION_LEN, MAVLINK_MSG_ID_MOUNT_ORIENTATION_CRC);
130static inline uint16_t mavlink_msg_mount_orientation_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_mount_orientation_t* mount_orientation)
132 return mavlink_msg_mount_orientation_pack(system_id, component_id, msg, mount_orientation->time_boot_ms, mount_orientation->roll, mount_orientation->pitch, mount_orientation->yaw);
144static inline uint16_t mavlink_msg_mount_orientation_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_mount_orientation_t* mount_orientation)
146 return mavlink_msg_mount_orientation_pack_chan(system_id, component_id, chan, msg, mount_orientation->time_boot_ms, mount_orientation->roll, mount_orientation->pitch, mount_orientation->yaw);
158#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
160static inline void mavlink_msg_mount_orientation_send(mavlink_channel_t chan, uint32_t time_boot_ms,
float roll,
float pitch,
float yaw)
162#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
163 char buf[MAVLINK_MSG_ID_MOUNT_ORIENTATION_LEN];
164 _mav_put_uint32_t(buf, 0, time_boot_ms);
165 _mav_put_float(buf, 4, roll);
166 _mav_put_float(buf, 8, pitch);
167 _mav_put_float(buf, 12, yaw);
169 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MOUNT_ORIENTATION, buf, MAVLINK_MSG_ID_MOUNT_ORIENTATION_MIN_LEN, MAVLINK_MSG_ID_MOUNT_ORIENTATION_LEN, MAVLINK_MSG_ID_MOUNT_ORIENTATION_CRC);
171 mavlink_mount_orientation_t packet;
172 packet.time_boot_ms = time_boot_ms;
174 packet.pitch = pitch;
177 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MOUNT_ORIENTATION, (
const char *)&packet, MAVLINK_MSG_ID_MOUNT_ORIENTATION_MIN_LEN, MAVLINK_MSG_ID_MOUNT_ORIENTATION_LEN, MAVLINK_MSG_ID_MOUNT_ORIENTATION_CRC);
186static inline void mavlink_msg_mount_orientation_send_struct(mavlink_channel_t chan,
const mavlink_mount_orientation_t* mount_orientation)
188#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
189 mavlink_msg_mount_orientation_send(chan, mount_orientation->time_boot_ms, mount_orientation->roll, mount_orientation->pitch, mount_orientation->yaw);
191 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MOUNT_ORIENTATION, (
const char *)mount_orientation, MAVLINK_MSG_ID_MOUNT_ORIENTATION_MIN_LEN, MAVLINK_MSG_ID_MOUNT_ORIENTATION_LEN, MAVLINK_MSG_ID_MOUNT_ORIENTATION_CRC);
195#if MAVLINK_MSG_ID_MOUNT_ORIENTATION_LEN <= MAVLINK_MAX_PAYLOAD_LEN
203static inline void mavlink_msg_mount_orientation_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms,
float roll,
float pitch,
float yaw)
205#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
206 char *buf = (
char *)msgbuf;
207 _mav_put_uint32_t(buf, 0, time_boot_ms);
208 _mav_put_float(buf, 4, roll);
209 _mav_put_float(buf, 8, pitch);
210 _mav_put_float(buf, 12, yaw);
212 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MOUNT_ORIENTATION, buf, MAVLINK_MSG_ID_MOUNT_ORIENTATION_MIN_LEN, MAVLINK_MSG_ID_MOUNT_ORIENTATION_LEN, MAVLINK_MSG_ID_MOUNT_ORIENTATION_CRC);
214 mavlink_mount_orientation_t *packet = (mavlink_mount_orientation_t *)msgbuf;
215 packet->time_boot_ms = time_boot_ms;
217 packet->pitch = pitch;
220 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MOUNT_ORIENTATION, (
const char *)packet, MAVLINK_MSG_ID_MOUNT_ORIENTATION_MIN_LEN, MAVLINK_MSG_ID_MOUNT_ORIENTATION_LEN, MAVLINK_MSG_ID_MOUNT_ORIENTATION_CRC);
235static inline uint32_t mavlink_msg_mount_orientation_get_time_boot_ms(
const mavlink_message_t* msg)
237 return _MAV_RETURN_uint32_t(msg, 0);
245static inline float mavlink_msg_mount_orientation_get_roll(
const mavlink_message_t* msg)
247 return _MAV_RETURN_float(msg, 4);
255static inline float mavlink_msg_mount_orientation_get_pitch(
const mavlink_message_t* msg)
257 return _MAV_RETURN_float(msg, 8);
265static inline float mavlink_msg_mount_orientation_get_yaw(
const mavlink_message_t* msg)
267 return _MAV_RETURN_float(msg, 12);
276static inline void mavlink_msg_mount_orientation_decode(
const mavlink_message_t* msg, mavlink_mount_orientation_t* mount_orientation)
278#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
279 mount_orientation->time_boot_ms = mavlink_msg_mount_orientation_get_time_boot_ms(msg);
280 mount_orientation->roll = mavlink_msg_mount_orientation_get_roll(msg);
281 mount_orientation->pitch = mavlink_msg_mount_orientation_get_pitch(msg);
282 mount_orientation->yaw = mavlink_msg_mount_orientation_get_yaw(msg);
284 uint8_t len = msg->len < MAVLINK_MSG_ID_MOUNT_ORIENTATION_LEN? msg->len : MAVLINK_MSG_ID_MOUNT_ORIENTATION_LEN;
285 memset(mount_orientation, 0, MAVLINK_MSG_ID_MOUNT_ORIENTATION_LEN);
286 memcpy(mount_orientation, _MAV_PAYLOAD(msg), len);