4#define MAVLINK_MSG_ID_LED_CONTROL 186
7typedef struct __mavlink_led_control_t {
9 uint8_t target_component;
13 uint8_t custom_bytes[24];
14}) mavlink_led_control_t;
16#define MAVLINK_MSG_ID_LED_CONTROL_LEN 29
17#define MAVLINK_MSG_ID_LED_CONTROL_MIN_LEN 29
18#define MAVLINK_MSG_ID_186_LEN 29
19#define MAVLINK_MSG_ID_186_MIN_LEN 29
21#define MAVLINK_MSG_ID_LED_CONTROL_CRC 72
22#define MAVLINK_MSG_ID_186_CRC 72
24#define MAVLINK_MSG_LED_CONTROL_FIELD_CUSTOM_BYTES_LEN 24
26#if MAVLINK_COMMAND_24BIT
27#define MAVLINK_MESSAGE_INFO_LED_CONTROL { \
31 { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_led_control_t, target_system) }, \
32 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_led_control_t, target_component) }, \
33 { "instance", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_led_control_t, instance) }, \
34 { "pattern", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_led_control_t, pattern) }, \
35 { "custom_len", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_led_control_t, custom_len) }, \
36 { "custom_bytes", NULL, MAVLINK_TYPE_UINT8_T, 24, 5, offsetof(mavlink_led_control_t, custom_bytes) }, \
40#define MAVLINK_MESSAGE_INFO_LED_CONTROL { \
43 { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_led_control_t, target_system) }, \
44 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_led_control_t, target_component) }, \
45 { "instance", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_led_control_t, instance) }, \
46 { "pattern", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_led_control_t, pattern) }, \
47 { "custom_len", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_led_control_t, custom_len) }, \
48 { "custom_bytes", NULL, MAVLINK_TYPE_UINT8_T, 24, 5, offsetof(mavlink_led_control_t, custom_bytes) }, \
67static inline uint16_t mavlink_msg_led_control_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
68 uint8_t target_system, uint8_t target_component, uint8_t instance, uint8_t pattern, uint8_t custom_len,
const uint8_t *custom_bytes)
70#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
71 char buf[MAVLINK_MSG_ID_LED_CONTROL_LEN];
72 _mav_put_uint8_t(buf, 0, target_system);
73 _mav_put_uint8_t(buf, 1, target_component);
74 _mav_put_uint8_t(buf, 2, instance);
75 _mav_put_uint8_t(buf, 3, pattern);
76 _mav_put_uint8_t(buf, 4, custom_len);
77 _mav_put_uint8_t_array(buf, 5, custom_bytes, 24);
78 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LED_CONTROL_LEN);
80 mavlink_led_control_t packet;
81 packet.target_system = target_system;
82 packet.target_component = target_component;
83 packet.instance = instance;
84 packet.pattern = pattern;
85 packet.custom_len = custom_len;
86 mav_array_memcpy(packet.custom_bytes, custom_bytes,
sizeof(uint8_t)*24);
87 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LED_CONTROL_LEN);
90 msg->msgid = MAVLINK_MSG_ID_LED_CONTROL;
91 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LED_CONTROL_MIN_LEN, MAVLINK_MSG_ID_LED_CONTROL_LEN, MAVLINK_MSG_ID_LED_CONTROL_CRC);
108static inline uint16_t mavlink_msg_led_control_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
109 mavlink_message_t* msg,
110 uint8_t target_system,uint8_t target_component,uint8_t instance,uint8_t pattern,uint8_t custom_len,
const uint8_t *custom_bytes)
112#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
113 char buf[MAVLINK_MSG_ID_LED_CONTROL_LEN];
114 _mav_put_uint8_t(buf, 0, target_system);
115 _mav_put_uint8_t(buf, 1, target_component);
116 _mav_put_uint8_t(buf, 2, instance);
117 _mav_put_uint8_t(buf, 3, pattern);
118 _mav_put_uint8_t(buf, 4, custom_len);
119 _mav_put_uint8_t_array(buf, 5, custom_bytes, 24);
120 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LED_CONTROL_LEN);
122 mavlink_led_control_t packet;
123 packet.target_system = target_system;
124 packet.target_component = target_component;
125 packet.instance = instance;
126 packet.pattern = pattern;
127 packet.custom_len = custom_len;
128 mav_array_memcpy(packet.custom_bytes, custom_bytes,
sizeof(uint8_t)*24);
129 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LED_CONTROL_LEN);
132 msg->msgid = MAVLINK_MSG_ID_LED_CONTROL;
133 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_LED_CONTROL_MIN_LEN, MAVLINK_MSG_ID_LED_CONTROL_LEN, MAVLINK_MSG_ID_LED_CONTROL_CRC);
144static inline uint16_t mavlink_msg_led_control_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_led_control_t* led_control)
146 return mavlink_msg_led_control_pack(system_id, component_id, msg, led_control->target_system, led_control->target_component, led_control->instance, led_control->pattern, led_control->custom_len, led_control->custom_bytes);
158static inline uint16_t mavlink_msg_led_control_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_led_control_t* led_control)
160 return mavlink_msg_led_control_pack_chan(system_id, component_id, chan, msg, led_control->target_system, led_control->target_component, led_control->instance, led_control->pattern, led_control->custom_len, led_control->custom_bytes);
174#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
176static inline void mavlink_msg_led_control_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t instance, uint8_t pattern, uint8_t custom_len,
const uint8_t *custom_bytes)
178#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
179 char buf[MAVLINK_MSG_ID_LED_CONTROL_LEN];
180 _mav_put_uint8_t(buf, 0, target_system);
181 _mav_put_uint8_t(buf, 1, target_component);
182 _mav_put_uint8_t(buf, 2, instance);
183 _mav_put_uint8_t(buf, 3, pattern);
184 _mav_put_uint8_t(buf, 4, custom_len);
185 _mav_put_uint8_t_array(buf, 5, custom_bytes, 24);
186 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LED_CONTROL, buf, MAVLINK_MSG_ID_LED_CONTROL_MIN_LEN, MAVLINK_MSG_ID_LED_CONTROL_LEN, MAVLINK_MSG_ID_LED_CONTROL_CRC);
188 mavlink_led_control_t packet;
189 packet.target_system = target_system;
190 packet.target_component = target_component;
191 packet.instance = instance;
192 packet.pattern = pattern;
193 packet.custom_len = custom_len;
194 mav_array_memcpy(packet.custom_bytes, custom_bytes,
sizeof(uint8_t)*24);
195 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LED_CONTROL, (
const char *)&packet, MAVLINK_MSG_ID_LED_CONTROL_MIN_LEN, MAVLINK_MSG_ID_LED_CONTROL_LEN, MAVLINK_MSG_ID_LED_CONTROL_CRC);
204static inline void mavlink_msg_led_control_send_struct(mavlink_channel_t chan,
const mavlink_led_control_t* led_control)
206#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
207 mavlink_msg_led_control_send(chan, led_control->target_system, led_control->target_component, led_control->instance, led_control->pattern, led_control->custom_len, led_control->custom_bytes);
209 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LED_CONTROL, (
const char *)led_control, MAVLINK_MSG_ID_LED_CONTROL_MIN_LEN, MAVLINK_MSG_ID_LED_CONTROL_LEN, MAVLINK_MSG_ID_LED_CONTROL_CRC);
213#if MAVLINK_MSG_ID_LED_CONTROL_LEN <= MAVLINK_MAX_PAYLOAD_LEN
221static inline void mavlink_msg_led_control_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t instance, uint8_t pattern, uint8_t custom_len,
const uint8_t *custom_bytes)
223#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
224 char *buf = (
char *)msgbuf;
225 _mav_put_uint8_t(buf, 0, target_system);
226 _mav_put_uint8_t(buf, 1, target_component);
227 _mav_put_uint8_t(buf, 2, instance);
228 _mav_put_uint8_t(buf, 3, pattern);
229 _mav_put_uint8_t(buf, 4, custom_len);
230 _mav_put_uint8_t_array(buf, 5, custom_bytes, 24);
231 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LED_CONTROL, buf, MAVLINK_MSG_ID_LED_CONTROL_MIN_LEN, MAVLINK_MSG_ID_LED_CONTROL_LEN, MAVLINK_MSG_ID_LED_CONTROL_CRC);
233 mavlink_led_control_t *packet = (mavlink_led_control_t *)msgbuf;
234 packet->target_system = target_system;
235 packet->target_component = target_component;
236 packet->instance = instance;
237 packet->pattern = pattern;
238 packet->custom_len = custom_len;
239 mav_array_memcpy(packet->custom_bytes, custom_bytes,
sizeof(uint8_t)*24);
240 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LED_CONTROL, (
const char *)packet, MAVLINK_MSG_ID_LED_CONTROL_MIN_LEN, MAVLINK_MSG_ID_LED_CONTROL_LEN, MAVLINK_MSG_ID_LED_CONTROL_CRC);
255static inline uint8_t mavlink_msg_led_control_get_target_system(
const mavlink_message_t* msg)
257 return _MAV_RETURN_uint8_t(msg, 0);
265static inline uint8_t mavlink_msg_led_control_get_target_component(
const mavlink_message_t* msg)
267 return _MAV_RETURN_uint8_t(msg, 1);
275static inline uint8_t mavlink_msg_led_control_get_instance(
const mavlink_message_t* msg)
277 return _MAV_RETURN_uint8_t(msg, 2);
285static inline uint8_t mavlink_msg_led_control_get_pattern(
const mavlink_message_t* msg)
287 return _MAV_RETURN_uint8_t(msg, 3);
295static inline uint8_t mavlink_msg_led_control_get_custom_len(
const mavlink_message_t* msg)
297 return _MAV_RETURN_uint8_t(msg, 4);
305static inline uint16_t mavlink_msg_led_control_get_custom_bytes(
const mavlink_message_t* msg, uint8_t *custom_bytes)
307 return _MAV_RETURN_uint8_t_array(msg, custom_bytes, 24, 5);
316static inline void mavlink_msg_led_control_decode(
const mavlink_message_t* msg, mavlink_led_control_t* led_control)
318#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
319 led_control->target_system = mavlink_msg_led_control_get_target_system(msg);
320 led_control->target_component = mavlink_msg_led_control_get_target_component(msg);
321 led_control->instance = mavlink_msg_led_control_get_instance(msg);
322 led_control->pattern = mavlink_msg_led_control_get_pattern(msg);
323 led_control->custom_len = mavlink_msg_led_control_get_custom_len(msg);
324 mavlink_msg_led_control_get_custom_bytes(msg, led_control->custom_bytes);
326 uint8_t len = msg->len < MAVLINK_MSG_ID_LED_CONTROL_LEN? msg->len : MAVLINK_MSG_ID_LED_CONTROL_LEN;
327 memset(led_control, 0, MAVLINK_MSG_ID_LED_CONTROL_LEN);
328 memcpy(led_control, _MAV_PAYLOAD(msg), len);