3 #define MAVLINK_MSG_ID_PARAM_SET 23
14 #define MAVLINK_MSG_ID_PARAM_SET_LEN 23
15 #define MAVLINK_MSG_ID_23_LEN 23
17 #define MAVLINK_MSG_ID_PARAM_SET_CRC 168
18 #define MAVLINK_MSG_ID_23_CRC 168
20 #define MAVLINK_MSG_PARAM_SET_FIELD_PARAM_ID_LEN 16
22 #define MAVLINK_MESSAGE_INFO_PARAM_SET { \
25 { { "param_value", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_param_set_t, param_value) }, \
26 { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_param_set_t, target_system) }, \
27 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_param_set_t, target_component) }, \
28 { "param_id", NULL, MAVLINK_TYPE_CHAR, 16, 6, offsetof(mavlink_param_set_t, param_id) }, \
29 { "param_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 22, offsetof(mavlink_param_set_t, param_type) }, \
47 static inline uint16_t mavlink_msg_param_set_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
48 uint8_t target_system, uint8_t target_component,
const char *param_id,
float param_value, uint8_t param_type)
50 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
56 _mav_put_char_array(buf, 6, param_id, 16);
64 mav_array_memcpy(packet.
param_id, param_id,
sizeof(
char)*16);
89 static inline uint16_t mavlink_msg_param_set_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
90 mavlink_message_t* msg,
91 uint8_t target_system,uint8_t target_component,
const char *param_id,
float param_value,uint8_t param_type)
93 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
99 _mav_put_char_array(buf, 6, param_id, 16);
107 mav_array_memcpy(packet.
param_id, param_id,
sizeof(
char)*16);
112 #if MAVLINK_CRC_EXTRA
127 static inline uint16_t mavlink_msg_param_set_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_param_set_t* param_set)
141 static inline uint16_t mavlink_msg_param_set_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_param_set_t* param_set)
156 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
158 static inline void mavlink_msg_param_set_send(
mavlink_channel_t chan, uint8_t target_system, uint8_t target_component,
const char *param_id,
float param_value, uint8_t param_type)
160 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
166 _mav_put_char_array(buf, 6, param_id, 16);
167 #if MAVLINK_CRC_EXTRA
178 mav_array_memcpy(packet.
param_id, param_id,
sizeof(
char)*16);
179 #if MAVLINK_CRC_EXTRA
187 #if MAVLINK_MSG_ID_PARAM_SET_LEN <= MAVLINK_MAX_PAYLOAD_LEN
195 static inline void mavlink_msg_param_set_send_buf(mavlink_message_t *msgbuf,
mavlink_channel_t chan, uint8_t target_system, uint8_t target_component,
const char *param_id,
float param_value, uint8_t param_type)
197 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
198 char *buf = (
char *)msgbuf;
203 _mav_put_char_array(buf, 6, param_id, 16);
204 #if MAVLINK_CRC_EXTRA
215 mav_array_memcpy(packet->
param_id, param_id,
sizeof(
char)*16);
216 #if MAVLINK_CRC_EXTRA
235 static inline uint8_t mavlink_msg_param_set_get_target_system(
const mavlink_message_t* msg)
245 static inline uint8_t mavlink_msg_param_set_get_target_component(
const mavlink_message_t* msg)
255 static inline uint16_t mavlink_msg_param_set_get_param_id(
const mavlink_message_t* msg,
char *param_id)
257 return _MAV_RETURN_char_array(msg, param_id, 16, 6);
265 static inline float mavlink_msg_param_set_get_param_value(
const mavlink_message_t* msg)
267 return _MAV_RETURN_float(msg, 0);
275 static inline uint8_t mavlink_msg_param_set_get_param_type(
const mavlink_message_t* msg)
286 static inline void mavlink_msg_param_set_decode(
const mavlink_message_t* msg,
mavlink_param_set_t* param_set)
288 #if MAVLINK_NEED_BYTE_SWAP
289 param_set->
param_value = mavlink_msg_param_set_get_param_value(msg);
290 param_set->
target_system = mavlink_msg_param_set_get_target_system(msg);
291 param_set->
target_component = mavlink_msg_param_set_get_target_component(msg);
292 mavlink_msg_param_set_get_param_id(msg, param_set->
param_id);
293 param_set->
param_type = mavlink_msg_param_set_get_param_type(msg);
#define _mav_put_float(buf, wire_offset, b)
Definition: protocol.h:145
#define _MAV_RETURN_uint8_t(msg, wire_offset)
Definition: protocol.h:238
#define MAVLINK_MSG_ID_PARAM_SET
Definition: mavlink_msg_param_set.h:3
#define MAVLINK_MSG_ID_PARAM_SET_CRC
Definition: mavlink_msg_param_set.h:17
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
struct __mavlink_param_set_t mavlink_param_set_t
#define _mav_put_uint8_t(buf, wire_offset, b)
Definition: protocol.h:134
#define _MAV_PAYLOAD_NON_CONST(msg)
Definition: mavlink_types.h:172
mavlink_channel_t
Definition: mavlink_types.h:178
uint8_t target_system
System ID.
Definition: mavlink_msg_param_set.h:8
#define _MAV_PAYLOAD(msg)
Definition: mavlink_types.h:171
Definition: mavlink_msg_param_set.h:5
uint8_t param_type
Onboard parameter type: see the MAV_PARAM_TYPE enum for supported data types.
Definition: mavlink_msg_param_set.h:11
char param_id[16]
Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHO...
Definition: mavlink_msg_param_set.h:10
float param_value
Onboard parameter value.
Definition: mavlink_msg_param_set.h:7
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
uint8_t target_component
Component ID.
Definition: mavlink_msg_param_set.h:9
#define MAVLINK_MSG_ID_PARAM_SET_LEN
Definition: mavlink_msg_param_set.h:14