GCS_MAVLink: run generate.sh
This commit is contained in:
parent
0997ab23a4
commit
d679831c75
File diff suppressed because one or more lines are too long
@ -0,0 +1,425 @@
|
||||
// MESSAGE AHRS3 PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_AHRS3 182
|
||||
|
||||
typedef struct __mavlink_ahrs3_t
|
||||
{
|
||||
float roll; ///< Roll angle (rad)
|
||||
float pitch; ///< Pitch angle (rad)
|
||||
float yaw; ///< Yaw angle (rad)
|
||||
float altitude; ///< Altitude (MSL)
|
||||
int32_t lat; ///< Latitude in degrees * 1E7
|
||||
int32_t lng; ///< Longitude in degrees * 1E7
|
||||
float v1; ///< test variable1
|
||||
float v2; ///< test variable2
|
||||
float v3; ///< test variable3
|
||||
float v4; ///< test variable4
|
||||
} mavlink_ahrs3_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_AHRS3_LEN 40
|
||||
#define MAVLINK_MSG_ID_182_LEN 40
|
||||
|
||||
#define MAVLINK_MSG_ID_AHRS3_CRC 229
|
||||
#define MAVLINK_MSG_ID_182_CRC 229
|
||||
|
||||
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_AHRS3 { \
|
||||
"AHRS3", \
|
||||
10, \
|
||||
{ { "roll", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_ahrs3_t, roll) }, \
|
||||
{ "pitch", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_ahrs3_t, pitch) }, \
|
||||
{ "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_ahrs3_t, yaw) }, \
|
||||
{ "altitude", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_ahrs3_t, altitude) }, \
|
||||
{ "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_ahrs3_t, lat) }, \
|
||||
{ "lng", NULL, MAVLINK_TYPE_INT32_T, 0, 20, offsetof(mavlink_ahrs3_t, lng) }, \
|
||||
{ "v1", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_ahrs3_t, v1) }, \
|
||||
{ "v2", NULL, MAVLINK_TYPE_FLOAT, 0, 28, offsetof(mavlink_ahrs3_t, v2) }, \
|
||||
{ "v3", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_ahrs3_t, v3) }, \
|
||||
{ "v4", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_ahrs3_t, v4) }, \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Pack a ahrs3 message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param roll Roll angle (rad)
|
||||
* @param pitch Pitch angle (rad)
|
||||
* @param yaw Yaw angle (rad)
|
||||
* @param altitude Altitude (MSL)
|
||||
* @param lat Latitude in degrees * 1E7
|
||||
* @param lng Longitude in degrees * 1E7
|
||||
* @param v1 test variable1
|
||||
* @param v2 test variable2
|
||||
* @param v3 test variable3
|
||||
* @param v4 test variable4
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_ahrs3_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
float roll, float pitch, float yaw, float altitude, int32_t lat, int32_t lng, float v1, float v2, float v3, float v4)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_AHRS3_LEN];
|
||||
_mav_put_float(buf, 0, roll);
|
||||
_mav_put_float(buf, 4, pitch);
|
||||
_mav_put_float(buf, 8, yaw);
|
||||
_mav_put_float(buf, 12, altitude);
|
||||
_mav_put_int32_t(buf, 16, lat);
|
||||
_mav_put_int32_t(buf, 20, lng);
|
||||
_mav_put_float(buf, 24, v1);
|
||||
_mav_put_float(buf, 28, v2);
|
||||
_mav_put_float(buf, 32, v3);
|
||||
_mav_put_float(buf, 36, v4);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AHRS3_LEN);
|
||||
#else
|
||||
mavlink_ahrs3_t packet;
|
||||
packet.roll = roll;
|
||||
packet.pitch = pitch;
|
||||
packet.yaw = yaw;
|
||||
packet.altitude = altitude;
|
||||
packet.lat = lat;
|
||||
packet.lng = lng;
|
||||
packet.v1 = v1;
|
||||
packet.v2 = v2;
|
||||
packet.v3 = v3;
|
||||
packet.v4 = v4;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AHRS3_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_AHRS3;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AHRS3_LEN, MAVLINK_MSG_ID_AHRS3_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AHRS3_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a ahrs3 message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param roll Roll angle (rad)
|
||||
* @param pitch Pitch angle (rad)
|
||||
* @param yaw Yaw angle (rad)
|
||||
* @param altitude Altitude (MSL)
|
||||
* @param lat Latitude in degrees * 1E7
|
||||
* @param lng Longitude in degrees * 1E7
|
||||
* @param v1 test variable1
|
||||
* @param v2 test variable2
|
||||
* @param v3 test variable3
|
||||
* @param v4 test variable4
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_ahrs3_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
float roll,float pitch,float yaw,float altitude,int32_t lat,int32_t lng,float v1,float v2,float v3,float v4)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_AHRS3_LEN];
|
||||
_mav_put_float(buf, 0, roll);
|
||||
_mav_put_float(buf, 4, pitch);
|
||||
_mav_put_float(buf, 8, yaw);
|
||||
_mav_put_float(buf, 12, altitude);
|
||||
_mav_put_int32_t(buf, 16, lat);
|
||||
_mav_put_int32_t(buf, 20, lng);
|
||||
_mav_put_float(buf, 24, v1);
|
||||
_mav_put_float(buf, 28, v2);
|
||||
_mav_put_float(buf, 32, v3);
|
||||
_mav_put_float(buf, 36, v4);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AHRS3_LEN);
|
||||
#else
|
||||
mavlink_ahrs3_t packet;
|
||||
packet.roll = roll;
|
||||
packet.pitch = pitch;
|
||||
packet.yaw = yaw;
|
||||
packet.altitude = altitude;
|
||||
packet.lat = lat;
|
||||
packet.lng = lng;
|
||||
packet.v1 = v1;
|
||||
packet.v2 = v2;
|
||||
packet.v3 = v3;
|
||||
packet.v4 = v4;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AHRS3_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_AHRS3;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_AHRS3_LEN, MAVLINK_MSG_ID_AHRS3_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_AHRS3_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a ahrs3 struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param ahrs3 C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_ahrs3_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_ahrs3_t* ahrs3)
|
||||
{
|
||||
return mavlink_msg_ahrs3_pack(system_id, component_id, msg, ahrs3->roll, ahrs3->pitch, ahrs3->yaw, ahrs3->altitude, ahrs3->lat, ahrs3->lng, ahrs3->v1, ahrs3->v2, ahrs3->v3, ahrs3->v4);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a ahrs3 struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param ahrs3 C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_ahrs3_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_ahrs3_t* ahrs3)
|
||||
{
|
||||
return mavlink_msg_ahrs3_pack_chan(system_id, component_id, chan, msg, ahrs3->roll, ahrs3->pitch, ahrs3->yaw, ahrs3->altitude, ahrs3->lat, ahrs3->lng, ahrs3->v1, ahrs3->v2, ahrs3->v3, ahrs3->v4);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a ahrs3 message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param roll Roll angle (rad)
|
||||
* @param pitch Pitch angle (rad)
|
||||
* @param yaw Yaw angle (rad)
|
||||
* @param altitude Altitude (MSL)
|
||||
* @param lat Latitude in degrees * 1E7
|
||||
* @param lng Longitude in degrees * 1E7
|
||||
* @param v1 test variable1
|
||||
* @param v2 test variable2
|
||||
* @param v3 test variable3
|
||||
* @param v4 test variable4
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_ahrs3_send(mavlink_channel_t chan, float roll, float pitch, float yaw, float altitude, int32_t lat, int32_t lng, float v1, float v2, float v3, float v4)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_AHRS3_LEN];
|
||||
_mav_put_float(buf, 0, roll);
|
||||
_mav_put_float(buf, 4, pitch);
|
||||
_mav_put_float(buf, 8, yaw);
|
||||
_mav_put_float(buf, 12, altitude);
|
||||
_mav_put_int32_t(buf, 16, lat);
|
||||
_mav_put_int32_t(buf, 20, lng);
|
||||
_mav_put_float(buf, 24, v1);
|
||||
_mav_put_float(buf, 28, v2);
|
||||
_mav_put_float(buf, 32, v3);
|
||||
_mav_put_float(buf, 36, v4);
|
||||
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AHRS3, buf, MAVLINK_MSG_ID_AHRS3_LEN, MAVLINK_MSG_ID_AHRS3_CRC);
|
||||
#else
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AHRS3, buf, MAVLINK_MSG_ID_AHRS3_LEN);
|
||||
#endif
|
||||
#else
|
||||
mavlink_ahrs3_t packet;
|
||||
packet.roll = roll;
|
||||
packet.pitch = pitch;
|
||||
packet.yaw = yaw;
|
||||
packet.altitude = altitude;
|
||||
packet.lat = lat;
|
||||
packet.lng = lng;
|
||||
packet.v1 = v1;
|
||||
packet.v2 = v2;
|
||||
packet.v3 = v3;
|
||||
packet.v4 = v4;
|
||||
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AHRS3, (const char *)&packet, MAVLINK_MSG_ID_AHRS3_LEN, MAVLINK_MSG_ID_AHRS3_CRC);
|
||||
#else
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AHRS3, (const char *)&packet, MAVLINK_MSG_ID_AHRS3_LEN);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#if MAVLINK_MSG_ID_AHRS3_LEN <= MAVLINK_MAX_PAYLOAD_LEN
|
||||
/*
|
||||
This varient of _send() can be used to save stack space by re-using
|
||||
memory from the receive buffer. The caller provides a
|
||||
mavlink_message_t which is the size of a full mavlink message. This
|
||||
is usually the receive buffer for the channel, and allows a reply to an
|
||||
incoming message with minimum stack space usage.
|
||||
*/
|
||||
static inline void mavlink_msg_ahrs3_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, float roll, float pitch, float yaw, float altitude, int32_t lat, int32_t lng, float v1, float v2, float v3, float v4)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char *buf = (char *)msgbuf;
|
||||
_mav_put_float(buf, 0, roll);
|
||||
_mav_put_float(buf, 4, pitch);
|
||||
_mav_put_float(buf, 8, yaw);
|
||||
_mav_put_float(buf, 12, altitude);
|
||||
_mav_put_int32_t(buf, 16, lat);
|
||||
_mav_put_int32_t(buf, 20, lng);
|
||||
_mav_put_float(buf, 24, v1);
|
||||
_mav_put_float(buf, 28, v2);
|
||||
_mav_put_float(buf, 32, v3);
|
||||
_mav_put_float(buf, 36, v4);
|
||||
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AHRS3, buf, MAVLINK_MSG_ID_AHRS3_LEN, MAVLINK_MSG_ID_AHRS3_CRC);
|
||||
#else
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AHRS3, buf, MAVLINK_MSG_ID_AHRS3_LEN);
|
||||
#endif
|
||||
#else
|
||||
mavlink_ahrs3_t *packet = (mavlink_ahrs3_t *)msgbuf;
|
||||
packet->roll = roll;
|
||||
packet->pitch = pitch;
|
||||
packet->yaw = yaw;
|
||||
packet->altitude = altitude;
|
||||
packet->lat = lat;
|
||||
packet->lng = lng;
|
||||
packet->v1 = v1;
|
||||
packet->v2 = v2;
|
||||
packet->v3 = v3;
|
||||
packet->v4 = v4;
|
||||
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AHRS3, (const char *)packet, MAVLINK_MSG_ID_AHRS3_LEN, MAVLINK_MSG_ID_AHRS3_CRC);
|
||||
#else
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AHRS3, (const char *)packet, MAVLINK_MSG_ID_AHRS3_LEN);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE AHRS3 UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field roll from ahrs3 message
|
||||
*
|
||||
* @return Roll angle (rad)
|
||||
*/
|
||||
static inline float mavlink_msg_ahrs3_get_roll(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field pitch from ahrs3 message
|
||||
*
|
||||
* @return Pitch angle (rad)
|
||||
*/
|
||||
static inline float mavlink_msg_ahrs3_get_pitch(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 4);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field yaw from ahrs3 message
|
||||
*
|
||||
* @return Yaw angle (rad)
|
||||
*/
|
||||
static inline float mavlink_msg_ahrs3_get_yaw(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field altitude from ahrs3 message
|
||||
*
|
||||
* @return Altitude (MSL)
|
||||
*/
|
||||
static inline float mavlink_msg_ahrs3_get_altitude(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 12);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field lat from ahrs3 message
|
||||
*
|
||||
* @return Latitude in degrees * 1E7
|
||||
*/
|
||||
static inline int32_t mavlink_msg_ahrs3_get_lat(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int32_t(msg, 16);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field lng from ahrs3 message
|
||||
*
|
||||
* @return Longitude in degrees * 1E7
|
||||
*/
|
||||
static inline int32_t mavlink_msg_ahrs3_get_lng(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int32_t(msg, 20);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field v1 from ahrs3 message
|
||||
*
|
||||
* @return test variable1
|
||||
*/
|
||||
static inline float mavlink_msg_ahrs3_get_v1(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 24);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field v2 from ahrs3 message
|
||||
*
|
||||
* @return test variable2
|
||||
*/
|
||||
static inline float mavlink_msg_ahrs3_get_v2(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 28);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field v3 from ahrs3 message
|
||||
*
|
||||
* @return test variable3
|
||||
*/
|
||||
static inline float mavlink_msg_ahrs3_get_v3(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 32);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field v4 from ahrs3 message
|
||||
*
|
||||
* @return test variable4
|
||||
*/
|
||||
static inline float mavlink_msg_ahrs3_get_v4(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 36);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a ahrs3 message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param ahrs3 C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_ahrs3_decode(const mavlink_message_t* msg, mavlink_ahrs3_t* ahrs3)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP
|
||||
ahrs3->roll = mavlink_msg_ahrs3_get_roll(msg);
|
||||
ahrs3->pitch = mavlink_msg_ahrs3_get_pitch(msg);
|
||||
ahrs3->yaw = mavlink_msg_ahrs3_get_yaw(msg);
|
||||
ahrs3->altitude = mavlink_msg_ahrs3_get_altitude(msg);
|
||||
ahrs3->lat = mavlink_msg_ahrs3_get_lat(msg);
|
||||
ahrs3->lng = mavlink_msg_ahrs3_get_lng(msg);
|
||||
ahrs3->v1 = mavlink_msg_ahrs3_get_v1(msg);
|
||||
ahrs3->v2 = mavlink_msg_ahrs3_get_v2(msg);
|
||||
ahrs3->v3 = mavlink_msg_ahrs3_get_v3(msg);
|
||||
ahrs3->v4 = mavlink_msg_ahrs3_get_v4(msg);
|
||||
#else
|
||||
memcpy(ahrs3, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_AHRS3_LEN);
|
||||
#endif
|
||||
}
|
@ -0,0 +1,233 @@
|
||||
// MESSAGE AUTOPILOT_VERSION_REQUEST PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST 182
|
||||
|
||||
typedef struct __mavlink_autopilot_version_request_t
|
||||
{
|
||||
uint8_t target_system; ///< System ID
|
||||
uint8_t target_component; ///< Component ID
|
||||
} mavlink_autopilot_version_request_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_LEN 2
|
||||
#define MAVLINK_MSG_ID_182_LEN 2
|
||||
|
||||
#define MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_CRC 85
|
||||
#define MAVLINK_MSG_ID_182_CRC 85
|
||||
|
||||
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION_REQUEST { \
|
||||
"AUTOPILOT_VERSION_REQUEST", \
|
||||
2, \
|
||||
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_autopilot_version_request_t, target_system) }, \
|
||||
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_autopilot_version_request_t, target_component) }, \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Pack a autopilot_version_request message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_autopilot_version_request_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_LEN];
|
||||
_mav_put_uint8_t(buf, 0, target_system);
|
||||
_mav_put_uint8_t(buf, 1, target_component);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_LEN);
|
||||
#else
|
||||
mavlink_autopilot_version_request_t packet;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_LEN, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a autopilot_version_request message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_autopilot_version_request_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint8_t target_system,uint8_t target_component)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_LEN];
|
||||
_mav_put_uint8_t(buf, 0, target_system);
|
||||
_mav_put_uint8_t(buf, 1, target_component);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_LEN);
|
||||
#else
|
||||
mavlink_autopilot_version_request_t packet;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_LEN, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a autopilot_version_request struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param autopilot_version_request C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_autopilot_version_request_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_autopilot_version_request_t* autopilot_version_request)
|
||||
{
|
||||
return mavlink_msg_autopilot_version_request_pack(system_id, component_id, msg, autopilot_version_request->target_system, autopilot_version_request->target_component);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a autopilot_version_request struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param autopilot_version_request C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_autopilot_version_request_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_autopilot_version_request_t* autopilot_version_request)
|
||||
{
|
||||
return mavlink_msg_autopilot_version_request_pack_chan(system_id, component_id, chan, msg, autopilot_version_request->target_system, autopilot_version_request->target_component);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a autopilot_version_request message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_autopilot_version_request_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_LEN];
|
||||
_mav_put_uint8_t(buf, 0, target_system);
|
||||
_mav_put_uint8_t(buf, 1, target_component);
|
||||
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST, buf, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_LEN, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_CRC);
|
||||
#else
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST, buf, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_LEN);
|
||||
#endif
|
||||
#else
|
||||
mavlink_autopilot_version_request_t packet;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST, (const char *)&packet, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_LEN, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_CRC);
|
||||
#else
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST, (const char *)&packet, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_LEN);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#if MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_LEN <= MAVLINK_MAX_PAYLOAD_LEN
|
||||
/*
|
||||
This varient of _send() can be used to save stack space by re-using
|
||||
memory from the receive buffer. The caller provides a
|
||||
mavlink_message_t which is the size of a full mavlink message. This
|
||||
is usually the receive buffer for the channel, and allows a reply to an
|
||||
incoming message with minimum stack space usage.
|
||||
*/
|
||||
static inline void mavlink_msg_autopilot_version_request_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char *buf = (char *)msgbuf;
|
||||
_mav_put_uint8_t(buf, 0, target_system);
|
||||
_mav_put_uint8_t(buf, 1, target_component);
|
||||
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST, buf, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_LEN, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_CRC);
|
||||
#else
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST, buf, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_LEN);
|
||||
#endif
|
||||
#else
|
||||
mavlink_autopilot_version_request_t *packet = (mavlink_autopilot_version_request_t *)msgbuf;
|
||||
packet->target_system = target_system;
|
||||
packet->target_component = target_component;
|
||||
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST, (const char *)packet, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_LEN, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_CRC);
|
||||
#else
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST, (const char *)packet, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_LEN);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE AUTOPILOT_VERSION_REQUEST UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field target_system from autopilot_version_request message
|
||||
*
|
||||
* @return System ID
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_autopilot_version_request_get_target_system(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field target_component from autopilot_version_request message
|
||||
*
|
||||
* @return Component ID
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_autopilot_version_request_get_target_component(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a autopilot_version_request message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param autopilot_version_request C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_autopilot_version_request_decode(const mavlink_message_t* msg, mavlink_autopilot_version_request_t* autopilot_version_request)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP
|
||||
autopilot_version_request->target_system = mavlink_msg_autopilot_version_request_get_target_system(msg);
|
||||
autopilot_version_request->target_component = mavlink_msg_autopilot_version_request_get_target_component(msg);
|
||||
#else
|
||||
memcpy(autopilot_version_request, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_LEN);
|
||||
#endif
|
||||
}
|
@ -1516,6 +1516,58 @@ static void mavlink_test_battery2(uint8_t system_id, uint8_t component_id, mavli
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
}
|
||||
|
||||
static void mavlink_test_ahrs3(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
|
||||
{
|
||||
mavlink_message_t msg;
|
||||
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
|
||||
uint16_t i;
|
||||
mavlink_ahrs3_t packet_in = {
|
||||
17.0,45.0,73.0,101.0,963498296,963498504,185.0,213.0,241.0,269.0
|
||||
};
|
||||
mavlink_ahrs3_t packet1, packet2;
|
||||
memset(&packet1, 0, sizeof(packet1));
|
||||
packet1.roll = packet_in.roll;
|
||||
packet1.pitch = packet_in.pitch;
|
||||
packet1.yaw = packet_in.yaw;
|
||||
packet1.altitude = packet_in.altitude;
|
||||
packet1.lat = packet_in.lat;
|
||||
packet1.lng = packet_in.lng;
|
||||
packet1.v1 = packet_in.v1;
|
||||
packet1.v2 = packet_in.v2;
|
||||
packet1.v3 = packet_in.v3;
|
||||
packet1.v4 = packet_in.v4;
|
||||
|
||||
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_ahrs3_encode(system_id, component_id, &msg, &packet1);
|
||||
mavlink_msg_ahrs3_decode(&msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_ahrs3_pack(system_id, component_id, &msg , packet1.roll , packet1.pitch , packet1.yaw , packet1.altitude , packet1.lat , packet1.lng , packet1.v1 , packet1.v2 , packet1.v3 , packet1.v4 );
|
||||
mavlink_msg_ahrs3_decode(&msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_ahrs3_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.roll , packet1.pitch , packet1.yaw , packet1.altitude , packet1.lat , packet1.lng , packet1.v1 , packet1.v2 , packet1.v3 , packet1.v4 );
|
||||
mavlink_msg_ahrs3_decode(&msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_to_send_buffer(buffer, &msg);
|
||||
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
|
||||
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
|
||||
}
|
||||
mavlink_msg_ahrs3_decode(last_msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_ahrs3_send(MAVLINK_COMM_1 , packet1.roll , packet1.pitch , packet1.yaw , packet1.altitude , packet1.lat , packet1.lng , packet1.v1 , packet1.v2 , packet1.v3 , packet1.v4 );
|
||||
mavlink_msg_ahrs3_decode(last_msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
}
|
||||
|
||||
static void mavlink_test_ardupilotmega(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
|
||||
{
|
||||
mavlink_test_sensor_offsets(system_id, component_id, last_msg);
|
||||
@ -1549,6 +1601,7 @@ static void mavlink_test_ardupilotmega(uint8_t system_id, uint8_t component_id,
|
||||
mavlink_test_camera_status(system_id, component_id, last_msg);
|
||||
mavlink_test_camera_feedback(system_id, component_id, last_msg);
|
||||
mavlink_test_battery2(system_id, component_id, last_msg);
|
||||
mavlink_test_ahrs3(system_id, component_id, last_msg);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -5,7 +5,7 @@
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Mon Jan 5 22:11:23 2015"
|
||||
#define MAVLINK_BUILD_DATE "Thu Jan 22 15:19:58 2015"
|
||||
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
|
||||
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -5,24 +5,42 @@
|
||||
typedef struct __mavlink_autopilot_version_t
|
||||
{
|
||||
uint64_t capabilities; ///< bitmask of capabilities (see MAV_PROTOCOL_CAPABILITY enum)
|
||||
uint32_t version; ///< Firmware version number
|
||||
uint8_t custom_version[8]; ///< Custom version field, commonly the first 8 bytes (16 characters) of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases.
|
||||
uint64_t uid; ///< UID if provided by hardware
|
||||
uint32_t flight_sw_version; ///< Firmware version number
|
||||
uint32_t middleware_sw_version; ///< Middleware version number
|
||||
uint32_t os_sw_version; ///< Operating system version number
|
||||
uint32_t board_version; ///< HW / board version (last 8 bytes should be silicon ID, if any)
|
||||
uint16_t vendor_id; ///< ID of the board vendor
|
||||
uint16_t product_id; ///< ID of the product
|
||||
uint8_t flight_custom_version[8]; ///< Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases.
|
||||
uint8_t middleware_custom_version[8]; ///< Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases.
|
||||
uint8_t os_custom_version[8]; ///< Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases.
|
||||
} mavlink_autopilot_version_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN 20
|
||||
#define MAVLINK_MSG_ID_148_LEN 20
|
||||
#define MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN 60
|
||||
#define MAVLINK_MSG_ID_148_LEN 60
|
||||
|
||||
#define MAVLINK_MSG_ID_AUTOPILOT_VERSION_CRC 49
|
||||
#define MAVLINK_MSG_ID_148_CRC 49
|
||||
#define MAVLINK_MSG_ID_AUTOPILOT_VERSION_CRC 178
|
||||
#define MAVLINK_MSG_ID_148_CRC 178
|
||||
|
||||
#define MAVLINK_MSG_AUTOPILOT_VERSION_FIELD_CUSTOM_VERSION_LEN 8
|
||||
#define MAVLINK_MSG_AUTOPILOT_VERSION_FIELD_FLIGHT_CUSTOM_VERSION_LEN 8
|
||||
#define MAVLINK_MSG_AUTOPILOT_VERSION_FIELD_MIDDLEWARE_CUSTOM_VERSION_LEN 8
|
||||
#define MAVLINK_MSG_AUTOPILOT_VERSION_FIELD_OS_CUSTOM_VERSION_LEN 8
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION { \
|
||||
"AUTOPILOT_VERSION", \
|
||||
3, \
|
||||
11, \
|
||||
{ { "capabilities", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_autopilot_version_t, capabilities) }, \
|
||||
{ "version", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_autopilot_version_t, version) }, \
|
||||
{ "custom_version", NULL, MAVLINK_TYPE_UINT8_T, 8, 12, offsetof(mavlink_autopilot_version_t, custom_version) }, \
|
||||
{ "uid", NULL, MAVLINK_TYPE_UINT64_T, 0, 8, offsetof(mavlink_autopilot_version_t, uid) }, \
|
||||
{ "flight_sw_version", NULL, MAVLINK_TYPE_UINT32_T, 0, 16, offsetof(mavlink_autopilot_version_t, flight_sw_version) }, \
|
||||
{ "middleware_sw_version", NULL, MAVLINK_TYPE_UINT32_T, 0, 20, offsetof(mavlink_autopilot_version_t, middleware_sw_version) }, \
|
||||
{ "os_sw_version", NULL, MAVLINK_TYPE_UINT32_T, 0, 24, offsetof(mavlink_autopilot_version_t, os_sw_version) }, \
|
||||
{ "board_version", NULL, MAVLINK_TYPE_UINT32_T, 0, 28, offsetof(mavlink_autopilot_version_t, board_version) }, \
|
||||
{ "vendor_id", NULL, MAVLINK_TYPE_UINT16_T, 0, 32, offsetof(mavlink_autopilot_version_t, vendor_id) }, \
|
||||
{ "product_id", NULL, MAVLINK_TYPE_UINT16_T, 0, 34, offsetof(mavlink_autopilot_version_t, product_id) }, \
|
||||
{ "flight_custom_version", NULL, MAVLINK_TYPE_UINT8_T, 8, 36, offsetof(mavlink_autopilot_version_t, flight_custom_version) }, \
|
||||
{ "middleware_custom_version", NULL, MAVLINK_TYPE_UINT8_T, 8, 44, offsetof(mavlink_autopilot_version_t, middleware_custom_version) }, \
|
||||
{ "os_custom_version", NULL, MAVLINK_TYPE_UINT8_T, 8, 52, offsetof(mavlink_autopilot_version_t, os_custom_version) }, \
|
||||
} \
|
||||
}
|
||||
|
||||
@ -34,24 +52,48 @@ typedef struct __mavlink_autopilot_version_t
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param capabilities bitmask of capabilities (see MAV_PROTOCOL_CAPABILITY enum)
|
||||
* @param version Firmware version number
|
||||
* @param custom_version Custom version field, commonly the first 8 bytes (16 characters) of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases.
|
||||
* @param flight_sw_version Firmware version number
|
||||
* @param middleware_sw_version Middleware version number
|
||||
* @param os_sw_version Operating system version number
|
||||
* @param board_version HW / board version (last 8 bytes should be silicon ID, if any)
|
||||
* @param flight_custom_version Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases.
|
||||
* @param middleware_custom_version Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases.
|
||||
* @param os_custom_version Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases.
|
||||
* @param vendor_id ID of the board vendor
|
||||
* @param product_id ID of the product
|
||||
* @param uid UID if provided by hardware
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_autopilot_version_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint64_t capabilities, uint32_t version, const uint8_t *custom_version)
|
||||
uint64_t capabilities, uint32_t flight_sw_version, uint32_t middleware_sw_version, uint32_t os_sw_version, uint32_t board_version, const uint8_t *flight_custom_version, const uint8_t *middleware_custom_version, const uint8_t *os_custom_version, uint16_t vendor_id, uint16_t product_id, uint64_t uid)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN];
|
||||
_mav_put_uint64_t(buf, 0, capabilities);
|
||||
_mav_put_uint32_t(buf, 8, version);
|
||||
_mav_put_uint8_t_array(buf, 12, custom_version, 8);
|
||||
_mav_put_uint64_t(buf, 8, uid);
|
||||
_mav_put_uint32_t(buf, 16, flight_sw_version);
|
||||
_mav_put_uint32_t(buf, 20, middleware_sw_version);
|
||||
_mav_put_uint32_t(buf, 24, os_sw_version);
|
||||
_mav_put_uint32_t(buf, 28, board_version);
|
||||
_mav_put_uint16_t(buf, 32, vendor_id);
|
||||
_mav_put_uint16_t(buf, 34, product_id);
|
||||
_mav_put_uint8_t_array(buf, 36, flight_custom_version, 8);
|
||||
_mav_put_uint8_t_array(buf, 44, middleware_custom_version, 8);
|
||||
_mav_put_uint8_t_array(buf, 52, os_custom_version, 8);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN);
|
||||
#else
|
||||
mavlink_autopilot_version_t packet;
|
||||
packet.capabilities = capabilities;
|
||||
packet.version = version;
|
||||
mav_array_memcpy(packet.custom_version, custom_version, sizeof(uint8_t)*8);
|
||||
packet.uid = uid;
|
||||
packet.flight_sw_version = flight_sw_version;
|
||||
packet.middleware_sw_version = middleware_sw_version;
|
||||
packet.os_sw_version = os_sw_version;
|
||||
packet.board_version = board_version;
|
||||
packet.vendor_id = vendor_id;
|
||||
packet.product_id = product_id;
|
||||
mav_array_memcpy(packet.flight_custom_version, flight_custom_version, sizeof(uint8_t)*8);
|
||||
mav_array_memcpy(packet.middleware_custom_version, middleware_custom_version, sizeof(uint8_t)*8);
|
||||
mav_array_memcpy(packet.os_custom_version, os_custom_version, sizeof(uint8_t)*8);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN);
|
||||
#endif
|
||||
|
||||
@ -70,25 +112,49 @@ static inline uint16_t mavlink_msg_autopilot_version_pack(uint8_t system_id, uin
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param capabilities bitmask of capabilities (see MAV_PROTOCOL_CAPABILITY enum)
|
||||
* @param version Firmware version number
|
||||
* @param custom_version Custom version field, commonly the first 8 bytes (16 characters) of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases.
|
||||
* @param flight_sw_version Firmware version number
|
||||
* @param middleware_sw_version Middleware version number
|
||||
* @param os_sw_version Operating system version number
|
||||
* @param board_version HW / board version (last 8 bytes should be silicon ID, if any)
|
||||
* @param flight_custom_version Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases.
|
||||
* @param middleware_custom_version Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases.
|
||||
* @param os_custom_version Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases.
|
||||
* @param vendor_id ID of the board vendor
|
||||
* @param product_id ID of the product
|
||||
* @param uid UID if provided by hardware
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_autopilot_version_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint64_t capabilities,uint32_t version,const uint8_t *custom_version)
|
||||
uint64_t capabilities,uint32_t flight_sw_version,uint32_t middleware_sw_version,uint32_t os_sw_version,uint32_t board_version,const uint8_t *flight_custom_version,const uint8_t *middleware_custom_version,const uint8_t *os_custom_version,uint16_t vendor_id,uint16_t product_id,uint64_t uid)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN];
|
||||
_mav_put_uint64_t(buf, 0, capabilities);
|
||||
_mav_put_uint32_t(buf, 8, version);
|
||||
_mav_put_uint8_t_array(buf, 12, custom_version, 8);
|
||||
_mav_put_uint64_t(buf, 8, uid);
|
||||
_mav_put_uint32_t(buf, 16, flight_sw_version);
|
||||
_mav_put_uint32_t(buf, 20, middleware_sw_version);
|
||||
_mav_put_uint32_t(buf, 24, os_sw_version);
|
||||
_mav_put_uint32_t(buf, 28, board_version);
|
||||
_mav_put_uint16_t(buf, 32, vendor_id);
|
||||
_mav_put_uint16_t(buf, 34, product_id);
|
||||
_mav_put_uint8_t_array(buf, 36, flight_custom_version, 8);
|
||||
_mav_put_uint8_t_array(buf, 44, middleware_custom_version, 8);
|
||||
_mav_put_uint8_t_array(buf, 52, os_custom_version, 8);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN);
|
||||
#else
|
||||
mavlink_autopilot_version_t packet;
|
||||
packet.capabilities = capabilities;
|
||||
packet.version = version;
|
||||
mav_array_memcpy(packet.custom_version, custom_version, sizeof(uint8_t)*8);
|
||||
packet.uid = uid;
|
||||
packet.flight_sw_version = flight_sw_version;
|
||||
packet.middleware_sw_version = middleware_sw_version;
|
||||
packet.os_sw_version = os_sw_version;
|
||||
packet.board_version = board_version;
|
||||
packet.vendor_id = vendor_id;
|
||||
packet.product_id = product_id;
|
||||
mav_array_memcpy(packet.flight_custom_version, flight_custom_version, sizeof(uint8_t)*8);
|
||||
mav_array_memcpy(packet.middleware_custom_version, middleware_custom_version, sizeof(uint8_t)*8);
|
||||
mav_array_memcpy(packet.os_custom_version, os_custom_version, sizeof(uint8_t)*8);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN);
|
||||
#endif
|
||||
|
||||
@ -110,7 +176,7 @@ static inline uint16_t mavlink_msg_autopilot_version_pack_chan(uint8_t system_id
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_autopilot_version_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_autopilot_version_t* autopilot_version)
|
||||
{
|
||||
return mavlink_msg_autopilot_version_pack(system_id, component_id, msg, autopilot_version->capabilities, autopilot_version->version, autopilot_version->custom_version);
|
||||
return mavlink_msg_autopilot_version_pack(system_id, component_id, msg, autopilot_version->capabilities, autopilot_version->flight_sw_version, autopilot_version->middleware_sw_version, autopilot_version->os_sw_version, autopilot_version->board_version, autopilot_version->flight_custom_version, autopilot_version->middleware_custom_version, autopilot_version->os_custom_version, autopilot_version->vendor_id, autopilot_version->product_id, autopilot_version->uid);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -124,7 +190,7 @@ static inline uint16_t mavlink_msg_autopilot_version_encode(uint8_t system_id, u
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_autopilot_version_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_autopilot_version_t* autopilot_version)
|
||||
{
|
||||
return mavlink_msg_autopilot_version_pack_chan(system_id, component_id, chan, msg, autopilot_version->capabilities, autopilot_version->version, autopilot_version->custom_version);
|
||||
return mavlink_msg_autopilot_version_pack_chan(system_id, component_id, chan, msg, autopilot_version->capabilities, autopilot_version->flight_sw_version, autopilot_version->middleware_sw_version, autopilot_version->os_sw_version, autopilot_version->board_version, autopilot_version->flight_custom_version, autopilot_version->middleware_custom_version, autopilot_version->os_custom_version, autopilot_version->vendor_id, autopilot_version->product_id, autopilot_version->uid);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -132,18 +198,34 @@ static inline uint16_t mavlink_msg_autopilot_version_encode_chan(uint8_t system_
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param capabilities bitmask of capabilities (see MAV_PROTOCOL_CAPABILITY enum)
|
||||
* @param version Firmware version number
|
||||
* @param custom_version Custom version field, commonly the first 8 bytes (16 characters) of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases.
|
||||
* @param flight_sw_version Firmware version number
|
||||
* @param middleware_sw_version Middleware version number
|
||||
* @param os_sw_version Operating system version number
|
||||
* @param board_version HW / board version (last 8 bytes should be silicon ID, if any)
|
||||
* @param flight_custom_version Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases.
|
||||
* @param middleware_custom_version Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases.
|
||||
* @param os_custom_version Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases.
|
||||
* @param vendor_id ID of the board vendor
|
||||
* @param product_id ID of the product
|
||||
* @param uid UID if provided by hardware
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_autopilot_version_send(mavlink_channel_t chan, uint64_t capabilities, uint32_t version, const uint8_t *custom_version)
|
||||
static inline void mavlink_msg_autopilot_version_send(mavlink_channel_t chan, uint64_t capabilities, uint32_t flight_sw_version, uint32_t middleware_sw_version, uint32_t os_sw_version, uint32_t board_version, const uint8_t *flight_custom_version, const uint8_t *middleware_custom_version, const uint8_t *os_custom_version, uint16_t vendor_id, uint16_t product_id, uint64_t uid)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN];
|
||||
_mav_put_uint64_t(buf, 0, capabilities);
|
||||
_mav_put_uint32_t(buf, 8, version);
|
||||
_mav_put_uint8_t_array(buf, 12, custom_version, 8);
|
||||
_mav_put_uint64_t(buf, 8, uid);
|
||||
_mav_put_uint32_t(buf, 16, flight_sw_version);
|
||||
_mav_put_uint32_t(buf, 20, middleware_sw_version);
|
||||
_mav_put_uint32_t(buf, 24, os_sw_version);
|
||||
_mav_put_uint32_t(buf, 28, board_version);
|
||||
_mav_put_uint16_t(buf, 32, vendor_id);
|
||||
_mav_put_uint16_t(buf, 34, product_id);
|
||||
_mav_put_uint8_t_array(buf, 36, flight_custom_version, 8);
|
||||
_mav_put_uint8_t_array(buf, 44, middleware_custom_version, 8);
|
||||
_mav_put_uint8_t_array(buf, 52, os_custom_version, 8);
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTOPILOT_VERSION, buf, MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN, MAVLINK_MSG_ID_AUTOPILOT_VERSION_CRC);
|
||||
#else
|
||||
@ -152,8 +234,16 @@ static inline void mavlink_msg_autopilot_version_send(mavlink_channel_t chan, ui
|
||||
#else
|
||||
mavlink_autopilot_version_t packet;
|
||||
packet.capabilities = capabilities;
|
||||
packet.version = version;
|
||||
mav_array_memcpy(packet.custom_version, custom_version, sizeof(uint8_t)*8);
|
||||
packet.uid = uid;
|
||||
packet.flight_sw_version = flight_sw_version;
|
||||
packet.middleware_sw_version = middleware_sw_version;
|
||||
packet.os_sw_version = os_sw_version;
|
||||
packet.board_version = board_version;
|
||||
packet.vendor_id = vendor_id;
|
||||
packet.product_id = product_id;
|
||||
mav_array_memcpy(packet.flight_custom_version, flight_custom_version, sizeof(uint8_t)*8);
|
||||
mav_array_memcpy(packet.middleware_custom_version, middleware_custom_version, sizeof(uint8_t)*8);
|
||||
mav_array_memcpy(packet.os_custom_version, os_custom_version, sizeof(uint8_t)*8);
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTOPILOT_VERSION, (const char *)&packet, MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN, MAVLINK_MSG_ID_AUTOPILOT_VERSION_CRC);
|
||||
#else
|
||||
@ -170,13 +260,21 @@ static inline void mavlink_msg_autopilot_version_send(mavlink_channel_t chan, ui
|
||||
is usually the receive buffer for the channel, and allows a reply to an
|
||||
incoming message with minimum stack space usage.
|
||||
*/
|
||||
static inline void mavlink_msg_autopilot_version_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t capabilities, uint32_t version, const uint8_t *custom_version)
|
||||
static inline void mavlink_msg_autopilot_version_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t capabilities, uint32_t flight_sw_version, uint32_t middleware_sw_version, uint32_t os_sw_version, uint32_t board_version, const uint8_t *flight_custom_version, const uint8_t *middleware_custom_version, const uint8_t *os_custom_version, uint16_t vendor_id, uint16_t product_id, uint64_t uid)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char *buf = (char *)msgbuf;
|
||||
_mav_put_uint64_t(buf, 0, capabilities);
|
||||
_mav_put_uint32_t(buf, 8, version);
|
||||
_mav_put_uint8_t_array(buf, 12, custom_version, 8);
|
||||
_mav_put_uint64_t(buf, 8, uid);
|
||||
_mav_put_uint32_t(buf, 16, flight_sw_version);
|
||||
_mav_put_uint32_t(buf, 20, middleware_sw_version);
|
||||
_mav_put_uint32_t(buf, 24, os_sw_version);
|
||||
_mav_put_uint32_t(buf, 28, board_version);
|
||||
_mav_put_uint16_t(buf, 32, vendor_id);
|
||||
_mav_put_uint16_t(buf, 34, product_id);
|
||||
_mav_put_uint8_t_array(buf, 36, flight_custom_version, 8);
|
||||
_mav_put_uint8_t_array(buf, 44, middleware_custom_version, 8);
|
||||
_mav_put_uint8_t_array(buf, 52, os_custom_version, 8);
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTOPILOT_VERSION, buf, MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN, MAVLINK_MSG_ID_AUTOPILOT_VERSION_CRC);
|
||||
#else
|
||||
@ -185,8 +283,16 @@ static inline void mavlink_msg_autopilot_version_send_buf(mavlink_message_t *msg
|
||||
#else
|
||||
mavlink_autopilot_version_t *packet = (mavlink_autopilot_version_t *)msgbuf;
|
||||
packet->capabilities = capabilities;
|
||||
packet->version = version;
|
||||
mav_array_memcpy(packet->custom_version, custom_version, sizeof(uint8_t)*8);
|
||||
packet->uid = uid;
|
||||
packet->flight_sw_version = flight_sw_version;
|
||||
packet->middleware_sw_version = middleware_sw_version;
|
||||
packet->os_sw_version = os_sw_version;
|
||||
packet->board_version = board_version;
|
||||
packet->vendor_id = vendor_id;
|
||||
packet->product_id = product_id;
|
||||
mav_array_memcpy(packet->flight_custom_version, flight_custom_version, sizeof(uint8_t)*8);
|
||||
mav_array_memcpy(packet->middleware_custom_version, middleware_custom_version, sizeof(uint8_t)*8);
|
||||
mav_array_memcpy(packet->os_custom_version, os_custom_version, sizeof(uint8_t)*8);
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTOPILOT_VERSION, (const char *)packet, MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN, MAVLINK_MSG_ID_AUTOPILOT_VERSION_CRC);
|
||||
#else
|
||||
@ -212,23 +318,103 @@ static inline uint64_t mavlink_msg_autopilot_version_get_capabilities(const mavl
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field version from autopilot_version message
|
||||
* @brief Get field flight_sw_version from autopilot_version message
|
||||
*
|
||||
* @return Firmware version number
|
||||
*/
|
||||
static inline uint32_t mavlink_msg_autopilot_version_get_version(const mavlink_message_t* msg)
|
||||
static inline uint32_t mavlink_msg_autopilot_version_get_flight_sw_version(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint32_t(msg, 8);
|
||||
return _MAV_RETURN_uint32_t(msg, 16);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field custom_version from autopilot_version message
|
||||
* @brief Get field middleware_sw_version from autopilot_version message
|
||||
*
|
||||
* @return Custom version field, commonly the first 8 bytes (16 characters) of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases.
|
||||
* @return Middleware version number
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_autopilot_version_get_custom_version(const mavlink_message_t* msg, uint8_t *custom_version)
|
||||
static inline uint32_t mavlink_msg_autopilot_version_get_middleware_sw_version(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t_array(msg, custom_version, 8, 12);
|
||||
return _MAV_RETURN_uint32_t(msg, 20);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field os_sw_version from autopilot_version message
|
||||
*
|
||||
* @return Operating system version number
|
||||
*/
|
||||
static inline uint32_t mavlink_msg_autopilot_version_get_os_sw_version(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint32_t(msg, 24);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field board_version from autopilot_version message
|
||||
*
|
||||
* @return HW / board version (last 8 bytes should be silicon ID, if any)
|
||||
*/
|
||||
static inline uint32_t mavlink_msg_autopilot_version_get_board_version(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint32_t(msg, 28);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field flight_custom_version from autopilot_version message
|
||||
*
|
||||
* @return Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases.
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_autopilot_version_get_flight_custom_version(const mavlink_message_t* msg, uint8_t *flight_custom_version)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t_array(msg, flight_custom_version, 8, 36);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field middleware_custom_version from autopilot_version message
|
||||
*
|
||||
* @return Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases.
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_autopilot_version_get_middleware_custom_version(const mavlink_message_t* msg, uint8_t *middleware_custom_version)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t_array(msg, middleware_custom_version, 8, 44);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field os_custom_version from autopilot_version message
|
||||
*
|
||||
* @return Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases.
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_autopilot_version_get_os_custom_version(const mavlink_message_t* msg, uint8_t *os_custom_version)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t_array(msg, os_custom_version, 8, 52);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field vendor_id from autopilot_version message
|
||||
*
|
||||
* @return ID of the board vendor
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_autopilot_version_get_vendor_id(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint16_t(msg, 32);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field product_id from autopilot_version message
|
||||
*
|
||||
* @return ID of the product
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_autopilot_version_get_product_id(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint16_t(msg, 34);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field uid from autopilot_version message
|
||||
*
|
||||
* @return UID if provided by hardware
|
||||
*/
|
||||
static inline uint64_t mavlink_msg_autopilot_version_get_uid(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint64_t(msg, 8);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -241,8 +427,16 @@ static inline void mavlink_msg_autopilot_version_decode(const mavlink_message_t*
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP
|
||||
autopilot_version->capabilities = mavlink_msg_autopilot_version_get_capabilities(msg);
|
||||
autopilot_version->version = mavlink_msg_autopilot_version_get_version(msg);
|
||||
mavlink_msg_autopilot_version_get_custom_version(msg, autopilot_version->custom_version);
|
||||
autopilot_version->uid = mavlink_msg_autopilot_version_get_uid(msg);
|
||||
autopilot_version->flight_sw_version = mavlink_msg_autopilot_version_get_flight_sw_version(msg);
|
||||
autopilot_version->middleware_sw_version = mavlink_msg_autopilot_version_get_middleware_sw_version(msg);
|
||||
autopilot_version->os_sw_version = mavlink_msg_autopilot_version_get_os_sw_version(msg);
|
||||
autopilot_version->board_version = mavlink_msg_autopilot_version_get_board_version(msg);
|
||||
autopilot_version->vendor_id = mavlink_msg_autopilot_version_get_vendor_id(msg);
|
||||
autopilot_version->product_id = mavlink_msg_autopilot_version_get_product_id(msg);
|
||||
mavlink_msg_autopilot_version_get_flight_custom_version(msg, autopilot_version->flight_custom_version);
|
||||
mavlink_msg_autopilot_version_get_middleware_custom_version(msg, autopilot_version->middleware_custom_version);
|
||||
mavlink_msg_autopilot_version_get_os_custom_version(msg, autopilot_version->os_custom_version);
|
||||
#else
|
||||
memcpy(autopilot_version, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN);
|
||||
#endif
|
||||
|
@ -7,7 +7,7 @@ typedef struct __mavlink_global_position_int_t
|
||||
uint32_t time_boot_ms; ///< Timestamp (milliseconds since system boot)
|
||||
int32_t lat; ///< Latitude, expressed as * 1E7
|
||||
int32_t lon; ///< Longitude, expressed as * 1E7
|
||||
int32_t alt; ///< Altitude in meters, expressed as * 1000 (millimeters), WGS84 (not AMSL)
|
||||
int32_t alt; ///< Altitude in meters, expressed as * 1000 (millimeters), AMSL (not WGS84 - note that virtually all GPS modules provide the AMSL as well)
|
||||
int32_t relative_alt; ///< Altitude above ground in meters, expressed as * 1000 (millimeters)
|
||||
int16_t vx; ///< Ground X Speed (Latitude), expressed as m/s * 100
|
||||
int16_t vy; ///< Ground Y Speed (Longitude), expressed as m/s * 100
|
||||
@ -48,7 +48,7 @@ typedef struct __mavlink_global_position_int_t
|
||||
* @param time_boot_ms Timestamp (milliseconds since system boot)
|
||||
* @param lat Latitude, expressed as * 1E7
|
||||
* @param lon Longitude, expressed as * 1E7
|
||||
* @param alt Altitude in meters, expressed as * 1000 (millimeters), WGS84 (not AMSL)
|
||||
* @param alt Altitude in meters, expressed as * 1000 (millimeters), AMSL (not WGS84 - note that virtually all GPS modules provide the AMSL as well)
|
||||
* @param relative_alt Altitude above ground in meters, expressed as * 1000 (millimeters)
|
||||
* @param vx Ground X Speed (Latitude), expressed as m/s * 100
|
||||
* @param vy Ground Y Speed (Longitude), expressed as m/s * 100
|
||||
@ -104,7 +104,7 @@ static inline uint16_t mavlink_msg_global_position_int_pack(uint8_t system_id, u
|
||||
* @param time_boot_ms Timestamp (milliseconds since system boot)
|
||||
* @param lat Latitude, expressed as * 1E7
|
||||
* @param lon Longitude, expressed as * 1E7
|
||||
* @param alt Altitude in meters, expressed as * 1000 (millimeters), WGS84 (not AMSL)
|
||||
* @param alt Altitude in meters, expressed as * 1000 (millimeters), AMSL (not WGS84 - note that virtually all GPS modules provide the AMSL as well)
|
||||
* @param relative_alt Altitude above ground in meters, expressed as * 1000 (millimeters)
|
||||
* @param vx Ground X Speed (Latitude), expressed as m/s * 100
|
||||
* @param vy Ground Y Speed (Longitude), expressed as m/s * 100
|
||||
@ -186,7 +186,7 @@ static inline uint16_t mavlink_msg_global_position_int_encode_chan(uint8_t syste
|
||||
* @param time_boot_ms Timestamp (milliseconds since system boot)
|
||||
* @param lat Latitude, expressed as * 1E7
|
||||
* @param lon Longitude, expressed as * 1E7
|
||||
* @param alt Altitude in meters, expressed as * 1000 (millimeters), WGS84 (not AMSL)
|
||||
* @param alt Altitude in meters, expressed as * 1000 (millimeters), AMSL (not WGS84 - note that virtually all GPS modules provide the AMSL as well)
|
||||
* @param relative_alt Altitude above ground in meters, expressed as * 1000 (millimeters)
|
||||
* @param vx Ground X Speed (Latitude), expressed as m/s * 100
|
||||
* @param vy Ground Y Speed (Longitude), expressed as m/s * 100
|
||||
@ -320,7 +320,7 @@ static inline int32_t mavlink_msg_global_position_int_get_lon(const mavlink_mess
|
||||
/**
|
||||
* @brief Get field alt from global_position_int message
|
||||
*
|
||||
* @return Altitude in meters, expressed as * 1000 (millimeters), WGS84 (not AMSL)
|
||||
* @return Altitude in meters, expressed as * 1000 (millimeters), AMSL (not WGS84 - note that virtually all GPS modules provide the AMSL as well)
|
||||
*/
|
||||
static inline int32_t mavlink_msg_global_position_int_get_alt(const mavlink_message_t* msg)
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ typedef struct __mavlink_gps2_raw_t
|
||||
uint64_t time_usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot)
|
||||
int32_t lat; ///< Latitude (WGS84), in degrees * 1E7
|
||||
int32_t lon; ///< Longitude (WGS84), in degrees * 1E7
|
||||
int32_t alt; ///< Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
int32_t alt; ///< Altitude (AMSL, not WGS84), in meters * 1000 (positive for up)
|
||||
uint32_t dgps_age; ///< Age of DGPS info
|
||||
uint16_t eph; ///< GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
|
||||
uint16_t epv; ///< GPS VDOP vertical dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
|
||||
@ -55,7 +55,7 @@ typedef struct __mavlink_gps2_raw_t
|
||||
* @param fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix, 4: DGPS fix, 5: RTK Fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
|
||||
* @param lat Latitude (WGS84), in degrees * 1E7
|
||||
* @param lon Longitude (WGS84), in degrees * 1E7
|
||||
* @param alt Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
* @param alt Altitude (AMSL, not WGS84), in meters * 1000 (positive for up)
|
||||
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
|
||||
* @param epv GPS VDOP vertical dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
|
||||
* @param vel GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX
|
||||
@ -120,7 +120,7 @@ static inline uint16_t mavlink_msg_gps2_raw_pack(uint8_t system_id, uint8_t comp
|
||||
* @param fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix, 4: DGPS fix, 5: RTK Fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
|
||||
* @param lat Latitude (WGS84), in degrees * 1E7
|
||||
* @param lon Longitude (WGS84), in degrees * 1E7
|
||||
* @param alt Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
* @param alt Altitude (AMSL, not WGS84), in meters * 1000 (positive for up)
|
||||
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
|
||||
* @param epv GPS VDOP vertical dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
|
||||
* @param vel GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX
|
||||
@ -211,7 +211,7 @@ static inline uint16_t mavlink_msg_gps2_raw_encode_chan(uint8_t system_id, uint8
|
||||
* @param fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix, 4: DGPS fix, 5: RTK Fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
|
||||
* @param lat Latitude (WGS84), in degrees * 1E7
|
||||
* @param lon Longitude (WGS84), in degrees * 1E7
|
||||
* @param alt Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
* @param alt Altitude (AMSL, not WGS84), in meters * 1000 (positive for up)
|
||||
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
|
||||
* @param epv GPS VDOP vertical dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
|
||||
* @param vel GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX
|
||||
@ -369,7 +369,7 @@ static inline int32_t mavlink_msg_gps2_raw_get_lon(const mavlink_message_t* msg)
|
||||
/**
|
||||
* @brief Get field alt from gps2_raw message
|
||||
*
|
||||
* @return Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
* @return Altitude (AMSL, not WGS84), in meters * 1000 (positive for up)
|
||||
*/
|
||||
static inline int32_t mavlink_msg_gps2_raw_get_alt(const mavlink_message_t* msg)
|
||||
{
|
||||
|
@ -6,7 +6,7 @@ typedef struct __mavlink_gps_global_origin_t
|
||||
{
|
||||
int32_t latitude; ///< Latitude (WGS84), in degrees * 1E7
|
||||
int32_t longitude; ///< Longitude (WGS84), in degrees * 1E7
|
||||
int32_t altitude; ///< Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
int32_t altitude; ///< Altitude (AMSL), in meters * 1000 (positive for up)
|
||||
} mavlink_gps_global_origin_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_GPS_GLOBAL_ORIGIN_LEN 12
|
||||
@ -35,7 +35,7 @@ typedef struct __mavlink_gps_global_origin_t
|
||||
*
|
||||
* @param latitude Latitude (WGS84), in degrees * 1E7
|
||||
* @param longitude Longitude (WGS84), in degrees * 1E7
|
||||
* @param altitude Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
* @param altitude Altitude (AMSL), in meters * 1000 (positive for up)
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gps_global_origin_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
@ -73,7 +73,7 @@ static inline uint16_t mavlink_msg_gps_global_origin_pack(uint8_t system_id, uin
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param latitude Latitude (WGS84), in degrees * 1E7
|
||||
* @param longitude Longitude (WGS84), in degrees * 1E7
|
||||
* @param altitude Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
* @param altitude Altitude (AMSL), in meters * 1000 (positive for up)
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gps_global_origin_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
@ -137,7 +137,7 @@ static inline uint16_t mavlink_msg_gps_global_origin_encode_chan(uint8_t system_
|
||||
*
|
||||
* @param latitude Latitude (WGS84), in degrees * 1E7
|
||||
* @param longitude Longitude (WGS84), in degrees * 1E7
|
||||
* @param altitude Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
* @param altitude Altitude (AMSL), in meters * 1000 (positive for up)
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
@ -232,7 +232,7 @@ static inline int32_t mavlink_msg_gps_global_origin_get_longitude(const mavlink_
|
||||
/**
|
||||
* @brief Get field altitude from gps_global_origin message
|
||||
*
|
||||
* @return Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
* @return Altitude (AMSL), in meters * 1000 (positive for up)
|
||||
*/
|
||||
static inline int32_t mavlink_msg_gps_global_origin_get_altitude(const mavlink_message_t* msg)
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ typedef struct __mavlink_gps_raw_int_t
|
||||
uint64_t time_usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot)
|
||||
int32_t lat; ///< Latitude (WGS84), in degrees * 1E7
|
||||
int32_t lon; ///< Longitude (WGS84), in degrees * 1E7
|
||||
int32_t alt; ///< Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
int32_t alt; ///< Altitude (AMSL, NOT WGS84), in meters * 1000 (positive for up). Note that virtually all GPS modules provide the AMSL altitude in addition to the WGS84 altitude.
|
||||
uint16_t eph; ///< GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
|
||||
uint16_t epv; ///< GPS VDOP vertical dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
|
||||
uint16_t vel; ///< GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX
|
||||
@ -51,7 +51,7 @@ typedef struct __mavlink_gps_raw_int_t
|
||||
* @param fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix, 4: DGPS, 5: RTK. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
|
||||
* @param lat Latitude (WGS84), in degrees * 1E7
|
||||
* @param lon Longitude (WGS84), in degrees * 1E7
|
||||
* @param alt Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
* @param alt Altitude (AMSL, NOT WGS84), in meters * 1000 (positive for up). Note that virtually all GPS modules provide the AMSL altitude in addition to the WGS84 altitude.
|
||||
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
|
||||
* @param epv GPS VDOP vertical dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
|
||||
* @param vel GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX
|
||||
@ -110,7 +110,7 @@ static inline uint16_t mavlink_msg_gps_raw_int_pack(uint8_t system_id, uint8_t c
|
||||
* @param fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix, 4: DGPS, 5: RTK. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
|
||||
* @param lat Latitude (WGS84), in degrees * 1E7
|
||||
* @param lon Longitude (WGS84), in degrees * 1E7
|
||||
* @param alt Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
* @param alt Altitude (AMSL, NOT WGS84), in meters * 1000 (positive for up). Note that virtually all GPS modules provide the AMSL altitude in addition to the WGS84 altitude.
|
||||
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
|
||||
* @param epv GPS VDOP vertical dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
|
||||
* @param vel GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX
|
||||
@ -195,7 +195,7 @@ static inline uint16_t mavlink_msg_gps_raw_int_encode_chan(uint8_t system_id, ui
|
||||
* @param fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix, 4: DGPS, 5: RTK. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
|
||||
* @param lat Latitude (WGS84), in degrees * 1E7
|
||||
* @param lon Longitude (WGS84), in degrees * 1E7
|
||||
* @param alt Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
* @param alt Altitude (AMSL, NOT WGS84), in meters * 1000 (positive for up). Note that virtually all GPS modules provide the AMSL altitude in addition to the WGS84 altitude.
|
||||
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
|
||||
* @param epv GPS VDOP vertical dilution of position in cm (m*100). If unknown, set to: UINT16_MAX
|
||||
* @param vel GPS ground speed (m/s * 100). If unknown, set to: UINT16_MAX
|
||||
@ -343,7 +343,7 @@ static inline int32_t mavlink_msg_gps_raw_int_get_lon(const mavlink_message_t* m
|
||||
/**
|
||||
* @brief Get field alt from gps_raw_int message
|
||||
*
|
||||
* @return Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
* @return Altitude (AMSL, NOT WGS84), in meters * 1000 (positive for up). Note that virtually all GPS modules provide the AMSL altitude in addition to the WGS84 altitude.
|
||||
*/
|
||||
static inline int32_t mavlink_msg_gps_raw_int_get_alt(const mavlink_message_t* msg)
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ typedef struct __mavlink_hil_gps_t
|
||||
uint64_t time_usec; ///< Timestamp (microseconds since UNIX epoch or microseconds since system boot)
|
||||
int32_t lat; ///< Latitude (WGS84), in degrees * 1E7
|
||||
int32_t lon; ///< Longitude (WGS84), in degrees * 1E7
|
||||
int32_t alt; ///< Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
int32_t alt; ///< Altitude (AMSL, not WGS84), in meters * 1000 (positive for up)
|
||||
uint16_t eph; ///< GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
|
||||
uint16_t epv; ///< GPS VDOP vertical dilution of position in cm (m*100). If unknown, set to: 65535
|
||||
uint16_t vel; ///< GPS ground speed (m/s * 100). If unknown, set to: 65535
|
||||
@ -57,7 +57,7 @@ typedef struct __mavlink_hil_gps_t
|
||||
* @param fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
|
||||
* @param lat Latitude (WGS84), in degrees * 1E7
|
||||
* @param lon Longitude (WGS84), in degrees * 1E7
|
||||
* @param alt Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
* @param alt Altitude (AMSL, not WGS84), in meters * 1000 (positive for up)
|
||||
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
|
||||
* @param epv GPS VDOP vertical dilution of position in cm (m*100). If unknown, set to: 65535
|
||||
* @param vel GPS ground speed (m/s * 100). If unknown, set to: 65535
|
||||
@ -125,7 +125,7 @@ static inline uint16_t mavlink_msg_hil_gps_pack(uint8_t system_id, uint8_t compo
|
||||
* @param fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
|
||||
* @param lat Latitude (WGS84), in degrees * 1E7
|
||||
* @param lon Longitude (WGS84), in degrees * 1E7
|
||||
* @param alt Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
* @param alt Altitude (AMSL, not WGS84), in meters * 1000 (positive for up)
|
||||
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
|
||||
* @param epv GPS VDOP vertical dilution of position in cm (m*100). If unknown, set to: 65535
|
||||
* @param vel GPS ground speed (m/s * 100). If unknown, set to: 65535
|
||||
@ -219,7 +219,7 @@ static inline uint16_t mavlink_msg_hil_gps_encode_chan(uint8_t system_id, uint8_
|
||||
* @param fix_type 0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix.
|
||||
* @param lat Latitude (WGS84), in degrees * 1E7
|
||||
* @param lon Longitude (WGS84), in degrees * 1E7
|
||||
* @param alt Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
* @param alt Altitude (AMSL, not WGS84), in meters * 1000 (positive for up)
|
||||
* @param eph GPS HDOP horizontal dilution of position in cm (m*100). If unknown, set to: 65535
|
||||
* @param epv GPS VDOP vertical dilution of position in cm (m*100). If unknown, set to: 65535
|
||||
* @param vel GPS ground speed (m/s * 100). If unknown, set to: 65535
|
||||
@ -382,7 +382,7 @@ static inline int32_t mavlink_msg_hil_gps_get_lon(const mavlink_message_t* msg)
|
||||
/**
|
||||
* @brief Get field alt from hil_gps message
|
||||
*
|
||||
* @return Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
* @return Altitude (AMSL, not WGS84), in meters * 1000 (positive for up)
|
||||
*/
|
||||
static inline int32_t mavlink_msg_hil_gps_get_alt(const mavlink_message_t* msg)
|
||||
{
|
||||
|
@ -0,0 +1,393 @@
|
||||
// MESSAGE PARAM_MAP_RC PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_PARAM_MAP_RC 50
|
||||
|
||||
typedef struct __mavlink_param_map_rc_t
|
||||
{
|
||||
float param_value0; ///< Initial parameter value
|
||||
float scale; ///< Scale, maps the RC range [-1, 1] to a parameter value
|
||||
float param_value_min; ///< Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)
|
||||
float param_value_max; ///< Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)
|
||||
int16_t param_index; ///< Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index.
|
||||
uint8_t target_system; ///< System ID
|
||||
uint8_t target_component; ///< Component ID
|
||||
char param_id[16]; ///< Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string
|
||||
uint8_t parameter_rc_channel_index; ///< Index of parameter RC channel. Not equal to the RC channel id. Typically correpsonds to a potentiometer-knob on the RC.
|
||||
} mavlink_param_map_rc_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_PARAM_MAP_RC_LEN 37
|
||||
#define MAVLINK_MSG_ID_50_LEN 37
|
||||
|
||||
#define MAVLINK_MSG_ID_PARAM_MAP_RC_CRC 78
|
||||
#define MAVLINK_MSG_ID_50_CRC 78
|
||||
|
||||
#define MAVLINK_MSG_PARAM_MAP_RC_FIELD_PARAM_ID_LEN 16
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_PARAM_MAP_RC { \
|
||||
"PARAM_MAP_RC", \
|
||||
9, \
|
||||
{ { "param_value0", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_param_map_rc_t, param_value0) }, \
|
||||
{ "scale", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_param_map_rc_t, scale) }, \
|
||||
{ "param_value_min", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_param_map_rc_t, param_value_min) }, \
|
||||
{ "param_value_max", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_param_map_rc_t, param_value_max) }, \
|
||||
{ "param_index", NULL, MAVLINK_TYPE_INT16_T, 0, 16, offsetof(mavlink_param_map_rc_t, param_index) }, \
|
||||
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 18, offsetof(mavlink_param_map_rc_t, target_system) }, \
|
||||
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 19, offsetof(mavlink_param_map_rc_t, target_component) }, \
|
||||
{ "param_id", NULL, MAVLINK_TYPE_CHAR, 16, 20, offsetof(mavlink_param_map_rc_t, param_id) }, \
|
||||
{ "parameter_rc_channel_index", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_param_map_rc_t, parameter_rc_channel_index) }, \
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Pack a param_map_rc message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
* @param param_id Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string
|
||||
* @param param_index Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index.
|
||||
* @param parameter_rc_channel_index Index of parameter RC channel. Not equal to the RC channel id. Typically correpsonds to a potentiometer-knob on the RC.
|
||||
* @param param_value0 Initial parameter value
|
||||
* @param scale Scale, maps the RC range [-1, 1] to a parameter value
|
||||
* @param param_value_min Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)
|
||||
* @param param_value_max Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_param_map_rc_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
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)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_PARAM_MAP_RC_LEN];
|
||||
_mav_put_float(buf, 0, param_value0);
|
||||
_mav_put_float(buf, 4, scale);
|
||||
_mav_put_float(buf, 8, param_value_min);
|
||||
_mav_put_float(buf, 12, param_value_max);
|
||||
_mav_put_int16_t(buf, 16, param_index);
|
||||
_mav_put_uint8_t(buf, 18, target_system);
|
||||
_mav_put_uint8_t(buf, 19, target_component);
|
||||
_mav_put_uint8_t(buf, 36, parameter_rc_channel_index);
|
||||
_mav_put_char_array(buf, 20, param_id, 16);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_PARAM_MAP_RC_LEN);
|
||||
#else
|
||||
mavlink_param_map_rc_t packet;
|
||||
packet.param_value0 = param_value0;
|
||||
packet.scale = scale;
|
||||
packet.param_value_min = param_value_min;
|
||||
packet.param_value_max = param_value_max;
|
||||
packet.param_index = param_index;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
packet.parameter_rc_channel_index = parameter_rc_channel_index;
|
||||
mav_array_memcpy(packet.param_id, param_id, sizeof(char)*16);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_PARAM_MAP_RC_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_PARAM_MAP_RC;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_PARAM_MAP_RC_LEN, MAVLINK_MSG_ID_PARAM_MAP_RC_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_PARAM_MAP_RC_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a param_map_rc message on a channel
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
* @param param_id Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string
|
||||
* @param param_index Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index.
|
||||
* @param parameter_rc_channel_index Index of parameter RC channel. Not equal to the RC channel id. Typically correpsonds to a potentiometer-knob on the RC.
|
||||
* @param param_value0 Initial parameter value
|
||||
* @param scale Scale, maps the RC range [-1, 1] to a parameter value
|
||||
* @param param_value_min Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)
|
||||
* @param param_value_max Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_param_map_rc_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
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)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_PARAM_MAP_RC_LEN];
|
||||
_mav_put_float(buf, 0, param_value0);
|
||||
_mav_put_float(buf, 4, scale);
|
||||
_mav_put_float(buf, 8, param_value_min);
|
||||
_mav_put_float(buf, 12, param_value_max);
|
||||
_mav_put_int16_t(buf, 16, param_index);
|
||||
_mav_put_uint8_t(buf, 18, target_system);
|
||||
_mav_put_uint8_t(buf, 19, target_component);
|
||||
_mav_put_uint8_t(buf, 36, parameter_rc_channel_index);
|
||||
_mav_put_char_array(buf, 20, param_id, 16);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_PARAM_MAP_RC_LEN);
|
||||
#else
|
||||
mavlink_param_map_rc_t packet;
|
||||
packet.param_value0 = param_value0;
|
||||
packet.scale = scale;
|
||||
packet.param_value_min = param_value_min;
|
||||
packet.param_value_max = param_value_max;
|
||||
packet.param_index = param_index;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
packet.parameter_rc_channel_index = parameter_rc_channel_index;
|
||||
mav_array_memcpy(packet.param_id, param_id, sizeof(char)*16);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_PARAM_MAP_RC_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_PARAM_MAP_RC;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_PARAM_MAP_RC_LEN, MAVLINK_MSG_ID_PARAM_MAP_RC_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_PARAM_MAP_RC_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a param_map_rc struct
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param param_map_rc C-struct to read the message contents from
|
||||
*/
|
||||
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)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a param_map_rc struct on a channel
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param chan The MAVLink channel this message will be sent over
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param param_map_rc C-struct to read the message contents from
|
||||
*/
|
||||
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)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a param_map_rc message
|
||||
* @param chan MAVLink channel to send the message
|
||||
*
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
* @param param_id Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string
|
||||
* @param param_index Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index.
|
||||
* @param parameter_rc_channel_index Index of parameter RC channel. Not equal to the RC channel id. Typically correpsonds to a potentiometer-knob on the RC.
|
||||
* @param param_value0 Initial parameter value
|
||||
* @param scale Scale, maps the RC range [-1, 1] to a parameter value
|
||||
* @param param_value_min Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)
|
||||
* @param param_value_max Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
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)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_PARAM_MAP_RC_LEN];
|
||||
_mav_put_float(buf, 0, param_value0);
|
||||
_mav_put_float(buf, 4, scale);
|
||||
_mav_put_float(buf, 8, param_value_min);
|
||||
_mav_put_float(buf, 12, param_value_max);
|
||||
_mav_put_int16_t(buf, 16, param_index);
|
||||
_mav_put_uint8_t(buf, 18, target_system);
|
||||
_mav_put_uint8_t(buf, 19, target_component);
|
||||
_mav_put_uint8_t(buf, 36, parameter_rc_channel_index);
|
||||
_mav_put_char_array(buf, 20, param_id, 16);
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_MAP_RC, buf, MAVLINK_MSG_ID_PARAM_MAP_RC_LEN, MAVLINK_MSG_ID_PARAM_MAP_RC_CRC);
|
||||
#else
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_MAP_RC, buf, MAVLINK_MSG_ID_PARAM_MAP_RC_LEN);
|
||||
#endif
|
||||
#else
|
||||
mavlink_param_map_rc_t packet;
|
||||
packet.param_value0 = param_value0;
|
||||
packet.scale = scale;
|
||||
packet.param_value_min = param_value_min;
|
||||
packet.param_value_max = param_value_max;
|
||||
packet.param_index = param_index;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
packet.parameter_rc_channel_index = parameter_rc_channel_index;
|
||||
mav_array_memcpy(packet.param_id, param_id, sizeof(char)*16);
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_MAP_RC, (const char *)&packet, MAVLINK_MSG_ID_PARAM_MAP_RC_LEN, MAVLINK_MSG_ID_PARAM_MAP_RC_CRC);
|
||||
#else
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_MAP_RC, (const char *)&packet, MAVLINK_MSG_ID_PARAM_MAP_RC_LEN);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
#if MAVLINK_MSG_ID_PARAM_MAP_RC_LEN <= MAVLINK_MAX_PAYLOAD_LEN
|
||||
/*
|
||||
This varient of _send() can be used to save stack space by re-using
|
||||
memory from the receive buffer. The caller provides a
|
||||
mavlink_message_t which is the size of a full mavlink message. This
|
||||
is usually the receive buffer for the channel, and allows a reply to an
|
||||
incoming message with minimum stack space usage.
|
||||
*/
|
||||
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)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char *buf = (char *)msgbuf;
|
||||
_mav_put_float(buf, 0, param_value0);
|
||||
_mav_put_float(buf, 4, scale);
|
||||
_mav_put_float(buf, 8, param_value_min);
|
||||
_mav_put_float(buf, 12, param_value_max);
|
||||
_mav_put_int16_t(buf, 16, param_index);
|
||||
_mav_put_uint8_t(buf, 18, target_system);
|
||||
_mav_put_uint8_t(buf, 19, target_component);
|
||||
_mav_put_uint8_t(buf, 36, parameter_rc_channel_index);
|
||||
_mav_put_char_array(buf, 20, param_id, 16);
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_MAP_RC, buf, MAVLINK_MSG_ID_PARAM_MAP_RC_LEN, MAVLINK_MSG_ID_PARAM_MAP_RC_CRC);
|
||||
#else
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_MAP_RC, buf, MAVLINK_MSG_ID_PARAM_MAP_RC_LEN);
|
||||
#endif
|
||||
#else
|
||||
mavlink_param_map_rc_t *packet = (mavlink_param_map_rc_t *)msgbuf;
|
||||
packet->param_value0 = param_value0;
|
||||
packet->scale = scale;
|
||||
packet->param_value_min = param_value_min;
|
||||
packet->param_value_max = param_value_max;
|
||||
packet->param_index = param_index;
|
||||
packet->target_system = target_system;
|
||||
packet->target_component = target_component;
|
||||
packet->parameter_rc_channel_index = parameter_rc_channel_index;
|
||||
mav_array_memcpy(packet->param_id, param_id, sizeof(char)*16);
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_MAP_RC, (const char *)packet, MAVLINK_MSG_ID_PARAM_MAP_RC_LEN, MAVLINK_MSG_ID_PARAM_MAP_RC_CRC);
|
||||
#else
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_PARAM_MAP_RC, (const char *)packet, MAVLINK_MSG_ID_PARAM_MAP_RC_LEN);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
// MESSAGE PARAM_MAP_RC UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field target_system from param_map_rc message
|
||||
*
|
||||
* @return System ID
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_param_map_rc_get_target_system(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 18);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field target_component from param_map_rc message
|
||||
*
|
||||
* @return Component ID
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_param_map_rc_get_target_component(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 19);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field param_id from param_map_rc message
|
||||
*
|
||||
* @return Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_param_map_rc_get_param_id(const mavlink_message_t* msg, char *param_id)
|
||||
{
|
||||
return _MAV_RETURN_char_array(msg, param_id, 16, 20);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field param_index from param_map_rc message
|
||||
*
|
||||
* @return Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index.
|
||||
*/
|
||||
static inline int16_t mavlink_msg_param_map_rc_get_param_index(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_int16_t(msg, 16);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field parameter_rc_channel_index from param_map_rc message
|
||||
*
|
||||
* @return Index of parameter RC channel. Not equal to the RC channel id. Typically correpsonds to a potentiometer-knob on the RC.
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_param_map_rc_get_parameter_rc_channel_index(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 36);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field param_value0 from param_map_rc message
|
||||
*
|
||||
* @return Initial parameter value
|
||||
*/
|
||||
static inline float mavlink_msg_param_map_rc_get_param_value0(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field scale from param_map_rc message
|
||||
*
|
||||
* @return Scale, maps the RC range [-1, 1] to a parameter value
|
||||
*/
|
||||
static inline float mavlink_msg_param_map_rc_get_scale(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 4);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field param_value_min from param_map_rc message
|
||||
*
|
||||
* @return Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)
|
||||
*/
|
||||
static inline float mavlink_msg_param_map_rc_get_param_value_min(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Get field param_value_max from param_map_rc message
|
||||
*
|
||||
* @return Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)
|
||||
*/
|
||||
static inline float mavlink_msg_param_map_rc_get_param_value_max(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_float(msg, 12);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Decode a param_map_rc message into a struct
|
||||
*
|
||||
* @param msg The message to decode
|
||||
* @param param_map_rc C-struct to decode the message contents into
|
||||
*/
|
||||
static inline void mavlink_msg_param_map_rc_decode(const mavlink_message_t* msg, mavlink_param_map_rc_t* param_map_rc)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP
|
||||
param_map_rc->param_value0 = mavlink_msg_param_map_rc_get_param_value0(msg);
|
||||
param_map_rc->scale = mavlink_msg_param_map_rc_get_scale(msg);
|
||||
param_map_rc->param_value_min = mavlink_msg_param_map_rc_get_param_value_min(msg);
|
||||
param_map_rc->param_value_max = mavlink_msg_param_map_rc_get_param_value_max(msg);
|
||||
param_map_rc->param_index = mavlink_msg_param_map_rc_get_param_index(msg);
|
||||
param_map_rc->target_system = mavlink_msg_param_map_rc_get_target_system(msg);
|
||||
param_map_rc->target_component = mavlink_msg_param_map_rc_get_target_component(msg);
|
||||
mavlink_msg_param_map_rc_get_param_id(msg, param_map_rc->param_id);
|
||||
param_map_rc->parameter_rc_channel_index = mavlink_msg_param_map_rc_get_parameter_rc_channel_index(msg);
|
||||
#else
|
||||
memcpy(param_map_rc, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_PARAM_MAP_RC_LEN);
|
||||
#endif
|
||||
}
|
@ -7,7 +7,7 @@ typedef struct __mavlink_position_target_global_int_t
|
||||
uint32_t time_boot_ms; ///< Timestamp in milliseconds since system boot. The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency.
|
||||
int32_t lat_int; ///< X Position in WGS84 frame in 1e7 * meters
|
||||
int32_t lon_int; ///< Y Position in WGS84 frame in 1e7 * meters
|
||||
float alt; ///< Altitude in meters in WGS84 altitude, not AMSL if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT
|
||||
float alt; ///< Altitude in meters in AMSL altitude, not WGS84 if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT
|
||||
float vx; ///< X velocity in NED frame in meter / s
|
||||
float vy; ///< Y velocity in NED frame in meter / s
|
||||
float vz; ///< Z velocity in NED frame in meter / s
|
||||
@ -60,7 +60,7 @@ typedef struct __mavlink_position_target_global_int_t
|
||||
* @param type_mask Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate
|
||||
* @param lat_int X Position in WGS84 frame in 1e7 * meters
|
||||
* @param lon_int Y Position in WGS84 frame in 1e7 * meters
|
||||
* @param alt Altitude in meters in WGS84 altitude, not AMSL if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT
|
||||
* @param alt Altitude in meters in AMSL altitude, not WGS84 if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT
|
||||
* @param vx X velocity in NED frame in meter / s
|
||||
* @param vy Y velocity in NED frame in meter / s
|
||||
* @param vz Z velocity in NED frame in meter / s
|
||||
@ -131,7 +131,7 @@ static inline uint16_t mavlink_msg_position_target_global_int_pack(uint8_t syste
|
||||
* @param type_mask Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate
|
||||
* @param lat_int X Position in WGS84 frame in 1e7 * meters
|
||||
* @param lon_int Y Position in WGS84 frame in 1e7 * meters
|
||||
* @param alt Altitude in meters in WGS84 altitude, not AMSL if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT
|
||||
* @param alt Altitude in meters in AMSL altitude, not WGS84 if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT
|
||||
* @param vx X velocity in NED frame in meter / s
|
||||
* @param vy Y velocity in NED frame in meter / s
|
||||
* @param vz Z velocity in NED frame in meter / s
|
||||
@ -228,7 +228,7 @@ static inline uint16_t mavlink_msg_position_target_global_int_encode_chan(uint8_
|
||||
* @param type_mask Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate
|
||||
* @param lat_int X Position in WGS84 frame in 1e7 * meters
|
||||
* @param lon_int Y Position in WGS84 frame in 1e7 * meters
|
||||
* @param alt Altitude in meters in WGS84 altitude, not AMSL if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT
|
||||
* @param alt Altitude in meters in AMSL altitude, not WGS84 if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT
|
||||
* @param vx X velocity in NED frame in meter / s
|
||||
* @param vy Y velocity in NED frame in meter / s
|
||||
* @param vz Z velocity in NED frame in meter / s
|
||||
@ -405,7 +405,7 @@ static inline int32_t mavlink_msg_position_target_global_int_get_lon_int(const m
|
||||
/**
|
||||
* @brief Get field alt from position_target_global_int message
|
||||
*
|
||||
* @return Altitude in meters in WGS84 altitude, not AMSL if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT
|
||||
* @return Altitude in meters in AMSL altitude, not WGS84 if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT
|
||||
*/
|
||||
static inline float mavlink_msg_position_target_global_int_get_alt(const mavlink_message_t* msg)
|
||||
{
|
||||
|
@ -6,7 +6,7 @@ typedef struct __mavlink_set_gps_global_origin_t
|
||||
{
|
||||
int32_t latitude; ///< Latitude (WGS84), in degrees * 1E7
|
||||
int32_t longitude; ///< Longitude (WGS84, in degrees * 1E7
|
||||
int32_t altitude; ///< Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
int32_t altitude; ///< Altitude (AMSL), in meters * 1000 (positive for up)
|
||||
uint8_t target_system; ///< System ID
|
||||
} mavlink_set_gps_global_origin_t;
|
||||
|
||||
@ -38,7 +38,7 @@ typedef struct __mavlink_set_gps_global_origin_t
|
||||
* @param target_system System ID
|
||||
* @param latitude Latitude (WGS84), in degrees * 1E7
|
||||
* @param longitude Longitude (WGS84, in degrees * 1E7
|
||||
* @param altitude Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
* @param altitude Altitude (AMSL), in meters * 1000 (positive for up)
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_set_gps_global_origin_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
@ -79,7 +79,7 @@ static inline uint16_t mavlink_msg_set_gps_global_origin_pack(uint8_t system_id,
|
||||
* @param target_system System ID
|
||||
* @param latitude Latitude (WGS84), in degrees * 1E7
|
||||
* @param longitude Longitude (WGS84, in degrees * 1E7
|
||||
* @param altitude Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
* @param altitude Altitude (AMSL), in meters * 1000 (positive for up)
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_set_gps_global_origin_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
|
||||
@ -146,7 +146,7 @@ static inline uint16_t mavlink_msg_set_gps_global_origin_encode_chan(uint8_t sys
|
||||
* @param target_system System ID
|
||||
* @param latitude Latitude (WGS84), in degrees * 1E7
|
||||
* @param longitude Longitude (WGS84, in degrees * 1E7
|
||||
* @param altitude Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
* @param altitude Altitude (AMSL), in meters * 1000 (positive for up)
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
@ -255,7 +255,7 @@ static inline int32_t mavlink_msg_set_gps_global_origin_get_longitude(const mavl
|
||||
/**
|
||||
* @brief Get field altitude from set_gps_global_origin message
|
||||
*
|
||||
* @return Altitude (WGS84), in meters * 1000 (positive for up)
|
||||
* @return Altitude (AMSL), in meters * 1000 (positive for up)
|
||||
*/
|
||||
static inline int32_t mavlink_msg_set_gps_global_origin_get_altitude(const mavlink_message_t* msg)
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ typedef struct __mavlink_set_position_target_global_int_t
|
||||
uint32_t time_boot_ms; ///< Timestamp in milliseconds since system boot. The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency.
|
||||
int32_t lat_int; ///< X Position in WGS84 frame in 1e7 * meters
|
||||
int32_t lon_int; ///< Y Position in WGS84 frame in 1e7 * meters
|
||||
float alt; ///< Altitude in meters in WGS84 altitude, not AMSL if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT
|
||||
float alt; ///< Altitude in meters in AMSL altitude, not WGS84 if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT
|
||||
float vx; ///< X velocity in NED frame in meter / s
|
||||
float vy; ///< Y velocity in NED frame in meter / s
|
||||
float vz; ///< Z velocity in NED frame in meter / s
|
||||
@ -66,7 +66,7 @@ typedef struct __mavlink_set_position_target_global_int_t
|
||||
* @param type_mask Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate
|
||||
* @param lat_int X Position in WGS84 frame in 1e7 * meters
|
||||
* @param lon_int Y Position in WGS84 frame in 1e7 * meters
|
||||
* @param alt Altitude in meters in WGS84 altitude, not AMSL if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT
|
||||
* @param alt Altitude in meters in AMSL altitude, not WGS84 if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT
|
||||
* @param vx X velocity in NED frame in meter / s
|
||||
* @param vy Y velocity in NED frame in meter / s
|
||||
* @param vz Z velocity in NED frame in meter / s
|
||||
@ -143,7 +143,7 @@ static inline uint16_t mavlink_msg_set_position_target_global_int_pack(uint8_t s
|
||||
* @param type_mask Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate
|
||||
* @param lat_int X Position in WGS84 frame in 1e7 * meters
|
||||
* @param lon_int Y Position in WGS84 frame in 1e7 * meters
|
||||
* @param alt Altitude in meters in WGS84 altitude, not AMSL if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT
|
||||
* @param alt Altitude in meters in AMSL altitude, not WGS84 if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT
|
||||
* @param vx X velocity in NED frame in meter / s
|
||||
* @param vy Y velocity in NED frame in meter / s
|
||||
* @param vz Z velocity in NED frame in meter / s
|
||||
@ -246,7 +246,7 @@ static inline uint16_t mavlink_msg_set_position_target_global_int_encode_chan(ui
|
||||
* @param type_mask Bitmask to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 10 is set the floats afx afy afz should be interpreted as force instead of acceleration. Mapping: bit 1: x, bit 2: y, bit 3: z, bit 4: vx, bit 5: vy, bit 6: vz, bit 7: ax, bit 8: ay, bit 9: az, bit 10: is force setpoint, bit 11: yaw, bit 12: yaw rate
|
||||
* @param lat_int X Position in WGS84 frame in 1e7 * meters
|
||||
* @param lon_int Y Position in WGS84 frame in 1e7 * meters
|
||||
* @param alt Altitude in meters in WGS84 altitude, not AMSL if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT
|
||||
* @param alt Altitude in meters in AMSL altitude, not WGS84 if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT
|
||||
* @param vx X velocity in NED frame in meter / s
|
||||
* @param vy Y velocity in NED frame in meter / s
|
||||
* @param vz Z velocity in NED frame in meter / s
|
||||
@ -451,7 +451,7 @@ static inline int32_t mavlink_msg_set_position_target_global_int_get_lon_int(con
|
||||
/**
|
||||
* @brief Get field alt from set_position_target_global_int message
|
||||
*
|
||||
* @return Altitude in meters in WGS84 altitude, not AMSL if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT
|
||||
* @return Altitude in meters in AMSL altitude, not WGS84 if absolute or relative, above terrain if GLOBAL_TERRAIN_ALT_INT
|
||||
*/
|
||||
static inline float mavlink_msg_set_position_target_global_int_get_alt(const mavlink_message_t* msg)
|
||||
{
|
||||
|
@ -1827,6 +1827,57 @@ static void mavlink_test_gps_global_origin(uint8_t system_id, uint8_t component_
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
}
|
||||
|
||||
static void mavlink_test_param_map_rc(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
|
||||
{
|
||||
mavlink_message_t msg;
|
||||
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
|
||||
uint16_t i;
|
||||
mavlink_param_map_rc_t packet_in = {
|
||||
17.0,45.0,73.0,101.0,18067,187,254,"UVWXYZABCDEFGHI",113
|
||||
};
|
||||
mavlink_param_map_rc_t packet1, packet2;
|
||||
memset(&packet1, 0, sizeof(packet1));
|
||||
packet1.param_value0 = packet_in.param_value0;
|
||||
packet1.scale = packet_in.scale;
|
||||
packet1.param_value_min = packet_in.param_value_min;
|
||||
packet1.param_value_max = packet_in.param_value_max;
|
||||
packet1.param_index = packet_in.param_index;
|
||||
packet1.target_system = packet_in.target_system;
|
||||
packet1.target_component = packet_in.target_component;
|
||||
packet1.parameter_rc_channel_index = packet_in.parameter_rc_channel_index;
|
||||
|
||||
mav_array_memcpy(packet1.param_id, packet_in.param_id, sizeof(char)*16);
|
||||
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_param_map_rc_encode(system_id, component_id, &msg, &packet1);
|
||||
mavlink_msg_param_map_rc_decode(&msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_param_map_rc_pack(system_id, component_id, &msg , packet1.target_system , packet1.target_component , packet1.param_id , packet1.param_index , packet1.parameter_rc_channel_index , packet1.param_value0 , packet1.scale , packet1.param_value_min , packet1.param_value_max );
|
||||
mavlink_msg_param_map_rc_decode(&msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_param_map_rc_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.target_system , packet1.target_component , packet1.param_id , packet1.param_index , packet1.parameter_rc_channel_index , packet1.param_value0 , packet1.scale , packet1.param_value_min , packet1.param_value_max );
|
||||
mavlink_msg_param_map_rc_decode(&msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_to_send_buffer(buffer, &msg);
|
||||
for (i=0; i<mavlink_msg_get_send_buffer_length(&msg); i++) {
|
||||
comm_send_ch(MAVLINK_COMM_0, buffer[i]);
|
||||
}
|
||||
mavlink_msg_param_map_rc_decode(last_msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_param_map_rc_send(MAVLINK_COMM_1 , packet1.target_system , packet1.target_component , packet1.param_id , packet1.param_index , packet1.parameter_rc_channel_index , packet1.param_value0 , packet1.scale , packet1.param_value_min , packet1.param_value_max );
|
||||
mavlink_msg_param_map_rc_decode(last_msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
}
|
||||
|
||||
static void mavlink_test_safety_set_allowed_area(uint8_t system_id, uint8_t component_id, mavlink_message_t *last_msg)
|
||||
{
|
||||
mavlink_message_t msg;
|
||||
@ -5075,14 +5126,22 @@ static void mavlink_test_autopilot_version(uint8_t system_id, uint8_t component_
|
||||
uint8_t buffer[MAVLINK_MAX_PACKET_LEN];
|
||||
uint16_t i;
|
||||
mavlink_autopilot_version_t packet_in = {
|
||||
93372036854775807ULL,963497880,{ 41, 42, 43, 44, 45, 46, 47, 48 }
|
||||
93372036854775807ULL,93372036854776311ULL,963498296,963498504,963498712,963498920,18899,19003,{ 113, 114, 115, 116, 117, 118, 119, 120 },{ 137, 138, 139, 140, 141, 142, 143, 144 },{ 161, 162, 163, 164, 165, 166, 167, 168 }
|
||||
};
|
||||
mavlink_autopilot_version_t packet1, packet2;
|
||||
memset(&packet1, 0, sizeof(packet1));
|
||||
packet1.capabilities = packet_in.capabilities;
|
||||
packet1.version = packet_in.version;
|
||||
packet1.uid = packet_in.uid;
|
||||
packet1.flight_sw_version = packet_in.flight_sw_version;
|
||||
packet1.middleware_sw_version = packet_in.middleware_sw_version;
|
||||
packet1.os_sw_version = packet_in.os_sw_version;
|
||||
packet1.board_version = packet_in.board_version;
|
||||
packet1.vendor_id = packet_in.vendor_id;
|
||||
packet1.product_id = packet_in.product_id;
|
||||
|
||||
mav_array_memcpy(packet1.custom_version, packet_in.custom_version, sizeof(uint8_t)*8);
|
||||
mav_array_memcpy(packet1.flight_custom_version, packet_in.flight_custom_version, sizeof(uint8_t)*8);
|
||||
mav_array_memcpy(packet1.middleware_custom_version, packet_in.middleware_custom_version, sizeof(uint8_t)*8);
|
||||
mav_array_memcpy(packet1.os_custom_version, packet_in.os_custom_version, sizeof(uint8_t)*8);
|
||||
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
@ -5091,12 +5150,12 @@ static void mavlink_test_autopilot_version(uint8_t system_id, uint8_t component_
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_autopilot_version_pack(system_id, component_id, &msg , packet1.capabilities , packet1.version , packet1.custom_version );
|
||||
mavlink_msg_autopilot_version_pack(system_id, component_id, &msg , packet1.capabilities , packet1.flight_sw_version , packet1.middleware_sw_version , packet1.os_sw_version , packet1.board_version , packet1.flight_custom_version , packet1.middleware_custom_version , packet1.os_custom_version , packet1.vendor_id , packet1.product_id , packet1.uid );
|
||||
mavlink_msg_autopilot_version_decode(&msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_autopilot_version_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.capabilities , packet1.version , packet1.custom_version );
|
||||
mavlink_msg_autopilot_version_pack_chan(system_id, component_id, MAVLINK_COMM_0, &msg , packet1.capabilities , packet1.flight_sw_version , packet1.middleware_sw_version , packet1.os_sw_version , packet1.board_version , packet1.flight_custom_version , packet1.middleware_custom_version , packet1.os_custom_version , packet1.vendor_id , packet1.product_id , packet1.uid );
|
||||
mavlink_msg_autopilot_version_decode(&msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
@ -5109,7 +5168,7 @@ static void mavlink_test_autopilot_version(uint8_t system_id, uint8_t component_
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
|
||||
memset(&packet2, 0, sizeof(packet2));
|
||||
mavlink_msg_autopilot_version_send(MAVLINK_COMM_1 , packet1.capabilities , packet1.version , packet1.custom_version );
|
||||
mavlink_msg_autopilot_version_send(MAVLINK_COMM_1 , packet1.capabilities , packet1.flight_sw_version , packet1.middleware_sw_version , packet1.os_sw_version , packet1.board_version , packet1.flight_custom_version , packet1.middleware_custom_version , packet1.os_custom_version , packet1.vendor_id , packet1.product_id , packet1.uid );
|
||||
mavlink_msg_autopilot_version_decode(last_msg, &packet2);
|
||||
MAVLINK_ASSERT(memcmp(&packet1, &packet2, sizeof(packet1)) == 0);
|
||||
}
|
||||
@ -5473,6 +5532,7 @@ static void mavlink_test_common(uint8_t system_id, uint8_t component_id, mavlink
|
||||
mavlink_test_mission_ack(system_id, component_id, last_msg);
|
||||
mavlink_test_set_gps_global_origin(system_id, component_id, last_msg);
|
||||
mavlink_test_gps_global_origin(system_id, component_id, last_msg);
|
||||
mavlink_test_param_map_rc(system_id, component_id, last_msg);
|
||||
mavlink_test_safety_set_allowed_area(system_id, component_id, last_msg);
|
||||
mavlink_test_safety_allowed_area(system_id, component_id, last_msg);
|
||||
mavlink_test_attitude_quaternion_cov(system_id, component_id, last_msg);
|
||||
|
@ -5,7 +5,7 @@
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Mon Jan 5 22:11:26 2015"
|
||||
#define MAVLINK_BUILD_DATE "Thu Jan 22 15:20:01 2015"
|
||||
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
|
||||
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user