3 #define MAVLINK_MSG_ID_LED_CONTROL 186
15 #define MAVLINK_MSG_ID_LED_CONTROL_LEN 29
16 #define MAVLINK_MSG_ID_186_LEN 29
18 #define MAVLINK_MSG_ID_LED_CONTROL_CRC 72
19 #define MAVLINK_MSG_ID_186_CRC 72
21 #define MAVLINK_MSG_LED_CONTROL_FIELD_CUSTOM_BYTES_LEN 24
23 #define MAVLINK_MESSAGE_INFO_LED_CONTROL { \
26 { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_led_control_t, target_system) }, \
27 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_led_control_t, target_component) }, \
28 { "instance", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_led_control_t, instance) }, \
29 { "pattern", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_led_control_t, pattern) }, \
30 { "custom_len", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_led_control_t, custom_len) }, \
31 { "custom_bytes", NULL, MAVLINK_TYPE_UINT8_T, 24, 5, offsetof(mavlink_led_control_t, custom_bytes) }, \
50 static inline uint16_t mavlink_msg_led_control_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
51 uint8_t target_system, uint8_t target_component, uint8_t instance, uint8_t pattern, uint8_t custom_len,
const uint8_t *custom_bytes)
53 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
60 _mav_put_uint8_t_array(buf, 5, custom_bytes, 24);
69 mav_array_memcpy(packet.
custom_bytes, custom_bytes,
sizeof(uint8_t)*24);
95 static inline uint16_t mavlink_msg_led_control_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
96 mavlink_message_t* msg,
97 uint8_t target_system,uint8_t target_component,uint8_t instance,uint8_t pattern,uint8_t custom_len,
const uint8_t *custom_bytes)
99 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
106 _mav_put_uint8_t_array(buf, 5, custom_bytes, 24);
115 mav_array_memcpy(packet.
custom_bytes, custom_bytes,
sizeof(uint8_t)*24);
120 #if MAVLINK_CRC_EXTRA
135 static 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)
149 static 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)
165 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
167 static 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)
169 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
176 _mav_put_uint8_t_array(buf, 5, custom_bytes, 24);
177 #if MAVLINK_CRC_EXTRA
189 mav_array_memcpy(packet.
custom_bytes, custom_bytes,
sizeof(uint8_t)*24);
190 #if MAVLINK_CRC_EXTRA
198 #if MAVLINK_MSG_ID_LED_CONTROL_LEN <= MAVLINK_MAX_PAYLOAD_LEN
206 static 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)
208 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
209 char *buf = (
char *)msgbuf;
215 _mav_put_uint8_t_array(buf, 5, custom_bytes, 24);
216 #if MAVLINK_CRC_EXTRA
228 mav_array_memcpy(packet->
custom_bytes, custom_bytes,
sizeof(uint8_t)*24);
229 #if MAVLINK_CRC_EXTRA
248 static inline uint8_t mavlink_msg_led_control_get_target_system(
const mavlink_message_t* msg)
258 static inline uint8_t mavlink_msg_led_control_get_target_component(
const mavlink_message_t* msg)
268 static inline uint8_t mavlink_msg_led_control_get_instance(
const mavlink_message_t* msg)
278 static inline uint8_t mavlink_msg_led_control_get_pattern(
const mavlink_message_t* msg)
288 static inline uint8_t mavlink_msg_led_control_get_custom_len(
const mavlink_message_t* msg)
298 static inline uint16_t mavlink_msg_led_control_get_custom_bytes(
const mavlink_message_t* msg, uint8_t *custom_bytes)
300 return _MAV_RETURN_uint8_t_array(msg, custom_bytes, 24, 5);
309 static inline void mavlink_msg_led_control_decode(
const mavlink_message_t* msg,
mavlink_led_control_t* led_control)
311 #if MAVLINK_NEED_BYTE_SWAP
312 led_control->
target_system = mavlink_msg_led_control_get_target_system(msg);
313 led_control->
target_component = mavlink_msg_led_control_get_target_component(msg);
314 led_control->
instance = mavlink_msg_led_control_get_instance(msg);
315 led_control->
pattern = mavlink_msg_led_control_get_pattern(msg);
316 led_control->
custom_len = mavlink_msg_led_control_get_custom_len(msg);
317 mavlink_msg_led_control_get_custom_bytes(msg, led_control->
custom_bytes);
uint8_t instance
Instance (LED instance to control or 255 for all LEDs)
Definition: mavlink_msg_led_control.h:9
#define _MAV_RETURN_uint8_t(msg, wire_offset)
Definition: protocol.h:238
Definition: mavlink_msg_led_control.h:5
MAVLINK_HELPER uint16_t mavlink_finalize_message(mavlink_message_t *msg, uint8_t system_id, uint8_t component_id, uint8_t length)
Finalize a MAVLink message with MAVLINK_COMM_0 as default channel.
Definition: mavlink_helpers.h:105
uint8_t pattern
Pattern (see LED_PATTERN_ENUM)
Definition: mavlink_msg_led_control.h:10
#define _mav_put_uint8_t(buf, wire_offset, b)
Definition: protocol.h:134
uint8_t custom_bytes[24]
Custom Bytes.
Definition: mavlink_msg_led_control.h:12
#define _MAV_PAYLOAD_NON_CONST(msg)
Definition: mavlink_types.h:172
uint8_t target_component
Component ID.
Definition: mavlink_msg_led_control.h:8
mavlink_channel_t
Definition: mavlink_types.h:178
uint8_t custom_len
Custom Byte Length.
Definition: mavlink_msg_led_control.h:11
#define _MAV_PAYLOAD(msg)
Definition: mavlink_types.h:171
uint8_t target_system
System ID.
Definition: mavlink_msg_led_control.h:7
#define MAVLINK_MSG_ID_LED_CONTROL_LEN
Definition: mavlink_msg_led_control.h:15
struct __mavlink_led_control_t mavlink_led_control_t
MAVLINK_HELPER uint16_t mavlink_finalize_message_chan(mavlink_message_t *msg, uint8_t system_id, uint8_t component_id, uint8_t chan, uint8_t length)
Finalize a MAVLink message with channel assignment.
Definition: mavlink_helpers.h:71
#define MAVLINK_MSG_ID_LED_CONTROL_CRC
Definition: mavlink_msg_led_control.h:18
#define MAVLINK_MSG_ID_LED_CONTROL
Definition: mavlink_msg_led_control.h:3