update
This commit is contained in:
@@ -15,17 +15,17 @@ typedef struct __mavlink_set_home_position_t {
|
||||
float approach_x; /*< [m] Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone.*/
|
||||
float approach_y; /*< [m] Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone.*/
|
||||
float approach_z; /*< [m] Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone.*/
|
||||
uint8_t target_system; /*< System ID.*/
|
||||
uint16_t target_system; /*< System ID.*/
|
||||
uint32_t time_usec; /*< [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.*/
|
||||
}) mavlink_set_home_position_t;
|
||||
|
||||
#define MAVLINK_MSG_ID_SET_HOME_POSITION_LEN 57
|
||||
#define MAVLINK_MSG_ID_SET_HOME_POSITION_MIN_LEN 53
|
||||
#define MAVLINK_MSG_ID_243_LEN 57
|
||||
#define MAVLINK_MSG_ID_243_MIN_LEN 53
|
||||
#define MAVLINK_MSG_ID_SET_HOME_POSITION_LEN 58
|
||||
#define MAVLINK_MSG_ID_SET_HOME_POSITION_MIN_LEN 54
|
||||
#define MAVLINK_MSG_ID_243_LEN 58
|
||||
#define MAVLINK_MSG_ID_243_MIN_LEN 54
|
||||
|
||||
#define MAVLINK_MSG_ID_SET_HOME_POSITION_CRC 85
|
||||
#define MAVLINK_MSG_ID_243_CRC 85
|
||||
#define MAVLINK_MSG_ID_SET_HOME_POSITION_CRC 5
|
||||
#define MAVLINK_MSG_ID_243_CRC 5
|
||||
|
||||
#define MAVLINK_MSG_SET_HOME_POSITION_FIELD_Q_LEN 4
|
||||
|
||||
@@ -34,7 +34,7 @@ typedef struct __mavlink_set_home_position_t {
|
||||
243, \
|
||||
"SET_HOME_POSITION", \
|
||||
12, \
|
||||
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 52, offsetof(mavlink_set_home_position_t, target_system) }, \
|
||||
{ { "target_system", NULL, MAVLINK_TYPE_UINT16_T, 0, 52, offsetof(mavlink_set_home_position_t, target_system) }, \
|
||||
{ "latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_set_home_position_t, latitude) }, \
|
||||
{ "longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_set_home_position_t, longitude) }, \
|
||||
{ "altitude", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_set_home_position_t, altitude) }, \
|
||||
@@ -45,14 +45,14 @@ typedef struct __mavlink_set_home_position_t {
|
||||
{ "approach_x", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_set_home_position_t, approach_x) }, \
|
||||
{ "approach_y", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_set_home_position_t, approach_y) }, \
|
||||
{ "approach_z", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_set_home_position_t, approach_z) }, \
|
||||
{ "time_usec", NULL, MAVLINK_TYPE_UINT32_T, 0, 53, offsetof(mavlink_set_home_position_t, time_usec) }, \
|
||||
{ "time_usec", NULL, MAVLINK_TYPE_UINT32_T, 0, 54, offsetof(mavlink_set_home_position_t, time_usec) }, \
|
||||
} \
|
||||
}
|
||||
#else
|
||||
#define MAVLINK_MESSAGE_INFO_SET_HOME_POSITION { \
|
||||
"SET_HOME_POSITION", \
|
||||
12, \
|
||||
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 52, offsetof(mavlink_set_home_position_t, target_system) }, \
|
||||
{ { "target_system", NULL, MAVLINK_TYPE_UINT16_T, 0, 52, offsetof(mavlink_set_home_position_t, target_system) }, \
|
||||
{ "latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_set_home_position_t, latitude) }, \
|
||||
{ "longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_set_home_position_t, longitude) }, \
|
||||
{ "altitude", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_set_home_position_t, altitude) }, \
|
||||
@@ -63,7 +63,7 @@ typedef struct __mavlink_set_home_position_t {
|
||||
{ "approach_x", NULL, MAVLINK_TYPE_FLOAT, 0, 40, offsetof(mavlink_set_home_position_t, approach_x) }, \
|
||||
{ "approach_y", NULL, MAVLINK_TYPE_FLOAT, 0, 44, offsetof(mavlink_set_home_position_t, approach_y) }, \
|
||||
{ "approach_z", NULL, MAVLINK_TYPE_FLOAT, 0, 48, offsetof(mavlink_set_home_position_t, approach_z) }, \
|
||||
{ "time_usec", NULL, MAVLINK_TYPE_UINT32_T, 0, 53, offsetof(mavlink_set_home_position_t, time_usec) }, \
|
||||
{ "time_usec", NULL, MAVLINK_TYPE_UINT32_T, 0, 54, offsetof(mavlink_set_home_position_t, time_usec) }, \
|
||||
} \
|
||||
}
|
||||
#endif
|
||||
@@ -89,7 +89,7 @@ typedef struct __mavlink_set_home_position_t {
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_set_home_position_pack(uint16_t system_id, uint8_t component_id, mavlink_message_t* msg,
|
||||
uint8_t target_system, int32_t latitude, int32_t longitude, int32_t altitude, float x, float y, float z, const float *q, float approach_x, float approach_y, float approach_z, uint32_t time_usec)
|
||||
uint16_t target_system, int32_t latitude, int32_t longitude, int32_t altitude, float x, float y, float z, const float *q, float approach_x, float approach_y, float approach_z, uint32_t time_usec)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_SET_HOME_POSITION_LEN];
|
||||
@@ -102,8 +102,8 @@ static inline uint16_t mavlink_msg_set_home_position_pack(uint16_t system_id, ui
|
||||
_mav_put_float(buf, 40, approach_x);
|
||||
_mav_put_float(buf, 44, approach_y);
|
||||
_mav_put_float(buf, 48, approach_z);
|
||||
_mav_put_uint8_t(buf, 52, target_system);
|
||||
_mav_put_uint32_t(buf, 53, time_usec);
|
||||
_mav_put_uint16_t(buf, 52, target_system);
|
||||
_mav_put_uint32_t(buf, 54, time_usec);
|
||||
_mav_put_float_array(buf, 24, q, 4);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SET_HOME_POSITION_LEN);
|
||||
#else
|
||||
@@ -149,7 +149,7 @@ static inline uint16_t mavlink_msg_set_home_position_pack(uint16_t system_id, ui
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_set_home_position_pack_chan(uint16_t system_id, uint8_t component_id, uint8_t chan,
|
||||
mavlink_message_t* msg,
|
||||
uint8_t target_system,int32_t latitude,int32_t longitude,int32_t altitude,float x,float y,float z,const float *q,float approach_x,float approach_y,float approach_z,uint32_t time_usec)
|
||||
uint16_t target_system,int32_t latitude,int32_t longitude,int32_t altitude,float x,float y,float z,const float *q,float approach_x,float approach_y,float approach_z,uint32_t time_usec)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_SET_HOME_POSITION_LEN];
|
||||
@@ -162,8 +162,8 @@ static inline uint16_t mavlink_msg_set_home_position_pack_chan(uint16_t system_i
|
||||
_mav_put_float(buf, 40, approach_x);
|
||||
_mav_put_float(buf, 44, approach_y);
|
||||
_mav_put_float(buf, 48, approach_z);
|
||||
_mav_put_uint8_t(buf, 52, target_system);
|
||||
_mav_put_uint32_t(buf, 53, time_usec);
|
||||
_mav_put_uint16_t(buf, 52, target_system);
|
||||
_mav_put_uint32_t(buf, 54, time_usec);
|
||||
_mav_put_float_array(buf, 24, q, 4);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SET_HOME_POSITION_LEN);
|
||||
#else
|
||||
@@ -233,7 +233,7 @@ static inline uint16_t mavlink_msg_set_home_position_encode_chan(uint16_t system
|
||||
*/
|
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
|
||||
|
||||
static inline void mavlink_msg_set_home_position_send(mavlink_channel_t chan, uint8_t target_system, int32_t latitude, int32_t longitude, int32_t altitude, float x, float y, float z, const float *q, float approach_x, float approach_y, float approach_z, uint32_t time_usec)
|
||||
static inline void mavlink_msg_set_home_position_send(mavlink_channel_t chan, uint16_t target_system, int32_t latitude, int32_t longitude, int32_t altitude, float x, float y, float z, const float *q, float approach_x, float approach_y, float approach_z, uint32_t time_usec)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_SET_HOME_POSITION_LEN];
|
||||
@@ -246,8 +246,8 @@ static inline void mavlink_msg_set_home_position_send(mavlink_channel_t chan, ui
|
||||
_mav_put_float(buf, 40, approach_x);
|
||||
_mav_put_float(buf, 44, approach_y);
|
||||
_mav_put_float(buf, 48, approach_z);
|
||||
_mav_put_uint8_t(buf, 52, target_system);
|
||||
_mav_put_uint32_t(buf, 53, time_usec);
|
||||
_mav_put_uint16_t(buf, 52, target_system);
|
||||
_mav_put_uint32_t(buf, 54, time_usec);
|
||||
_mav_put_float_array(buf, 24, q, 4);
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_HOME_POSITION, buf, MAVLINK_MSG_ID_SET_HOME_POSITION_MIN_LEN, MAVLINK_MSG_ID_SET_HOME_POSITION_LEN, MAVLINK_MSG_ID_SET_HOME_POSITION_CRC);
|
||||
#else
|
||||
@@ -290,7 +290,7 @@ static inline void mavlink_msg_set_home_position_send_struct(mavlink_channel_t c
|
||||
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_set_home_position_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, int32_t latitude, int32_t longitude, int32_t altitude, float x, float y, float z, const float *q, float approach_x, float approach_y, float approach_z, uint32_t time_usec)
|
||||
static inline void mavlink_msg_set_home_position_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint16_t target_system, int32_t latitude, int32_t longitude, int32_t altitude, float x, float y, float z, const float *q, float approach_x, float approach_y, float approach_z, uint32_t time_usec)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char *buf = (char *)msgbuf;
|
||||
@@ -303,8 +303,8 @@ static inline void mavlink_msg_set_home_position_send_buf(mavlink_message_t *msg
|
||||
_mav_put_float(buf, 40, approach_x);
|
||||
_mav_put_float(buf, 44, approach_y);
|
||||
_mav_put_float(buf, 48, approach_z);
|
||||
_mav_put_uint8_t(buf, 52, target_system);
|
||||
_mav_put_uint32_t(buf, 53, time_usec);
|
||||
_mav_put_uint16_t(buf, 52, target_system);
|
||||
_mav_put_uint32_t(buf, 54, time_usec);
|
||||
_mav_put_float_array(buf, 24, q, 4);
|
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SET_HOME_POSITION, buf, MAVLINK_MSG_ID_SET_HOME_POSITION_MIN_LEN, MAVLINK_MSG_ID_SET_HOME_POSITION_LEN, MAVLINK_MSG_ID_SET_HOME_POSITION_CRC);
|
||||
#else
|
||||
@@ -336,9 +336,9 @@ static inline void mavlink_msg_set_home_position_send_buf(mavlink_message_t *msg
|
||||
*
|
||||
* @return System ID.
|
||||
*/
|
||||
static inline uint8_t mavlink_msg_set_home_position_get_target_system(const mavlink_message_t* msg)
|
||||
static inline uint16_t mavlink_msg_set_home_position_get_target_system(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint8_t(msg, 52);
|
||||
return _MAV_RETURN_uint16_t(msg, 52);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -448,7 +448,7 @@ static inline float mavlink_msg_set_home_position_get_approach_z(const mavlink_m
|
||||
*/
|
||||
static inline uint32_t mavlink_msg_set_home_position_get_time_usec(const mavlink_message_t* msg)
|
||||
{
|
||||
return _MAV_RETURN_uint32_t(msg, 53);
|
||||
return _MAV_RETURN_uint32_t(msg, 54);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user