3 #define MAVLINK_MSG_ID_PARAM_MAP_RC 50
18 #define MAVLINK_MSG_ID_PARAM_MAP_RC_LEN 37
19 #define MAVLINK_MSG_ID_50_LEN 37
21 #define MAVLINK_MSG_ID_PARAM_MAP_RC_CRC 78
22 #define MAVLINK_MSG_ID_50_CRC 78
24 #define MAVLINK_MSG_PARAM_MAP_RC_FIELD_PARAM_ID_LEN 16
26 #define MAVLINK_MESSAGE_INFO_PARAM_MAP_RC { \
29 { { "param_value0", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_param_map_rc_t, param_value0) }, \
30 { "scale", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_param_map_rc_t, scale) }, \
31 { "param_value_min", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_param_map_rc_t, param_value_min) }, \
32 { "param_value_max", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_param_map_rc_t, param_value_max) }, \
33 { "param_index", NULL, MAVLINK_TYPE_INT16_T, 0, 16, offsetof(mavlink_param_map_rc_t, param_index) }, \
34 { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 18, offsetof(mavlink_param_map_rc_t, target_system) }, \
35 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 19, offsetof(mavlink_param_map_rc_t, target_component) }, \
36 { "param_id", NULL, MAVLINK_TYPE_CHAR, 16, 20, offsetof(mavlink_param_map_rc_t, param_id) }, \
37 { "parameter_rc_channel_index", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_param_map_rc_t, parameter_rc_channel_index) }, \
59 static inline uint16_t mavlink_msg_param_map_rc_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
60 uint8_t target_system, uint8_t target_component,
const char *param_id, int16_t param_index, uint8_t parameter_rc_channel_index,
float param_value0,
float scale,
float param_value_min,
float param_value_max)
62 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
72 _mav_put_char_array(buf, 20, param_id, 16);
84 mav_array_memcpy(packet.
param_id, param_id,
sizeof(
char)*16);
113 static inline uint16_t mavlink_msg_param_map_rc_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
114 mavlink_message_t* msg,
115 uint8_t target_system,uint8_t target_component,
const char *param_id,int16_t param_index,uint8_t parameter_rc_channel_index,
float param_value0,
float scale,
float param_value_min,
float param_value_max)
117 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
127 _mav_put_char_array(buf, 20, param_id, 16);
139 mav_array_memcpy(packet.
param_id, param_id,
sizeof(
char)*16);
144 #if MAVLINK_CRC_EXTRA
159 static inline uint16_t mavlink_msg_param_map_rc_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_param_map_rc_t* param_map_rc)
161 return mavlink_msg_param_map_rc_pack(system_id, component_id, msg, param_map_rc->
target_system, param_map_rc->
target_component, param_map_rc->
param_id, param_map_rc->
param_index, param_map_rc->
parameter_rc_channel_index, param_map_rc->
param_value0, param_map_rc->
scale, param_map_rc->
param_value_min, param_map_rc->
param_value_max);
173 static inline uint16_t mavlink_msg_param_map_rc_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_param_map_rc_t* param_map_rc)
175 return mavlink_msg_param_map_rc_pack_chan(system_id, component_id, chan, msg, param_map_rc->
target_system, param_map_rc->
target_component, param_map_rc->
param_id, param_map_rc->
param_index, param_map_rc->
parameter_rc_channel_index, param_map_rc->
param_value0, param_map_rc->
scale, param_map_rc->
param_value_min, param_map_rc->
param_value_max);
192 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
194 static inline void mavlink_msg_param_map_rc_send(
mavlink_channel_t chan, uint8_t target_system, uint8_t target_component,
const char *param_id, int16_t param_index, uint8_t parameter_rc_channel_index,
float param_value0,
float scale,
float param_value_min,
float param_value_max)
196 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
206 _mav_put_char_array(buf, 20, param_id, 16);
207 #if MAVLINK_CRC_EXTRA
222 mav_array_memcpy(packet.
param_id, param_id,
sizeof(
char)*16);
223 #if MAVLINK_CRC_EXTRA
231 #if MAVLINK_MSG_ID_PARAM_MAP_RC_LEN <= MAVLINK_MAX_PAYLOAD_LEN
239 static inline void mavlink_msg_param_map_rc_send_buf(mavlink_message_t *msgbuf,
mavlink_channel_t chan, uint8_t target_system, uint8_t target_component,
const char *param_id, int16_t param_index, uint8_t parameter_rc_channel_index,
float param_value0,
float scale,
float param_value_min,
float param_value_max)
241 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
242 char *buf = (
char *)msgbuf;
251 _mav_put_char_array(buf, 20, param_id, 16);
252 #if MAVLINK_CRC_EXTRA
267 mav_array_memcpy(packet->
param_id, param_id,
sizeof(
char)*16);
268 #if MAVLINK_CRC_EXTRA
287 static inline uint8_t mavlink_msg_param_map_rc_get_target_system(
const mavlink_message_t* msg)
297 static inline uint8_t mavlink_msg_param_map_rc_get_target_component(
const mavlink_message_t* msg)
307 static inline uint16_t mavlink_msg_param_map_rc_get_param_id(
const mavlink_message_t* msg,
char *param_id)
309 return _MAV_RETURN_char_array(msg, param_id, 16, 20);
317 static inline int16_t mavlink_msg_param_map_rc_get_param_index(
const mavlink_message_t* msg)
319 return _MAV_RETURN_int16_t(msg, 16);
327 static inline uint8_t mavlink_msg_param_map_rc_get_parameter_rc_channel_index(
const mavlink_message_t* msg)
337 static inline float mavlink_msg_param_map_rc_get_param_value0(
const mavlink_message_t* msg)
339 return _MAV_RETURN_float(msg, 0);
347 static inline float mavlink_msg_param_map_rc_get_scale(
const mavlink_message_t* msg)
349 return _MAV_RETURN_float(msg, 4);
357 static inline float mavlink_msg_param_map_rc_get_param_value_min(
const mavlink_message_t* msg)
359 return _MAV_RETURN_float(msg, 8);
367 static inline float mavlink_msg_param_map_rc_get_param_value_max(
const mavlink_message_t* msg)
369 return _MAV_RETURN_float(msg, 12);
378 static inline void mavlink_msg_param_map_rc_decode(
const mavlink_message_t* msg,
mavlink_param_map_rc_t* param_map_rc)
380 #if MAVLINK_NEED_BYTE_SWAP
381 param_map_rc->
param_value0 = mavlink_msg_param_map_rc_get_param_value0(msg);
382 param_map_rc->
scale = mavlink_msg_param_map_rc_get_scale(msg);
383 param_map_rc->
param_value_min = mavlink_msg_param_map_rc_get_param_value_min(msg);
384 param_map_rc->
param_value_max = mavlink_msg_param_map_rc_get_param_value_max(msg);
385 param_map_rc->
param_index = mavlink_msg_param_map_rc_get_param_index(msg);
386 param_map_rc->
target_system = mavlink_msg_param_map_rc_get_target_system(msg);
387 param_map_rc->
target_component = mavlink_msg_param_map_rc_get_target_component(msg);
388 mavlink_msg_param_map_rc_get_param_id(msg, param_map_rc->
param_id);
#define _mav_put_float(buf, wire_offset, b)
Definition: protocol.h:145
#define MAVLINK_MSG_ID_PARAM_MAP_RC_LEN
Definition: mavlink_msg_param_map_rc.h:18
float param_value_min
Minimum param value. The protocol does not define if this overwrites an onboard minimum value...
Definition: mavlink_msg_param_map_rc.h:9
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_map_rc.h:14
#define _MAV_RETURN_uint8_t(msg, wire_offset)
Definition: protocol.h:238
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
#define _mav_put_uint8_t(buf, wire_offset, b)
Definition: protocol.h:134
#define _MAV_PAYLOAD_NON_CONST(msg)
Definition: mavlink_types.h:172
uint8_t target_component
Component ID.
Definition: mavlink_msg_param_map_rc.h:13
mavlink_channel_t
Definition: mavlink_types.h:178
uint8_t target_system
System ID.
Definition: mavlink_msg_param_map_rc.h:12
struct __mavlink_param_map_rc_t mavlink_param_map_rc_t
int16_t param_index
Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)...
Definition: mavlink_msg_param_map_rc.h:11
#define _MAV_PAYLOAD(msg)
Definition: mavlink_types.h:171
Definition: mavlink_msg_param_map_rc.h:5
float scale
Scale, maps the RC range [-1, 1] to a parameter value.
Definition: mavlink_msg_param_map_rc.h:8
float param_value_max
Maximum param value. The protocol does not define if this overwrites an onboard maximum value...
Definition: mavlink_msg_param_map_rc.h:10
#define MAVLINK_MSG_ID_PARAM_MAP_RC
Definition: mavlink_msg_param_map_rc.h:3
uint8_t parameter_rc_channel_index
Index of parameter RC channel. Not equal to the RC channel id. Typically correpsonds to a potentiomet...
Definition: mavlink_msg_param_map_rc.h:15
int16_t scale
Definition: mixer.h:14
#define MAVLINK_MSG_ID_PARAM_MAP_RC_CRC
Definition: mavlink_msg_param_map_rc.h:21
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 _mav_put_int16_t(buf, wire_offset, b)
Definition: protocol.h:140
float param_value0
Initial parameter value.
Definition: mavlink_msg_param_map_rc.h:7