autogenerated headers for rev https://github.com/mavlink/mavlink/tree/2909b48183888bd884c6d81764c42aa7ba7daf11
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@
|
||||
#error Wrong include order: MAVLINK_ASLUAV.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
|
||||
#endif
|
||||
|
||||
#define MAVLINK_ASLUAV_XML_HASH 316866643315165655
|
||||
#define MAVLINK_ASLUAV_XML_HASH 5280776994826192524
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#ifndef MAVLINK_H
|
||||
#define MAVLINK_H
|
||||
|
||||
#define MAVLINK_PRIMARY_XML_HASH 316866643315165655
|
||||
#define MAVLINK_PRIMARY_XML_HASH 5280776994826192524
|
||||
|
||||
#ifndef MAVLINK_STX
|
||||
#define MAVLINK_STX 253
|
||||
|
||||
@@ -105,6 +105,60 @@ static inline uint16_t mavlink_msg_asl_obctrl_pack(uint8_t system_id, uint8_t co
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ASL_OBCTRL_MIN_LEN, MAVLINK_MSG_ID_ASL_OBCTRL_LEN, MAVLINK_MSG_ID_ASL_OBCTRL_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a asl_obctrl message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param timestamp [us] Time since system start
|
||||
* @param uElev Elevator command [~]
|
||||
* @param uThrot Throttle command [~]
|
||||
* @param uThrot2 Throttle 2 command [~]
|
||||
* @param uAilL Left aileron command [~]
|
||||
* @param uAilR Right aileron command [~]
|
||||
* @param uRud Rudder command [~]
|
||||
* @param obctrl_status Off-board computer status
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_asl_obctrl_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint64_t timestamp, float uElev, float uThrot, float uThrot2, float uAilL, float uAilR, float uRud, uint8_t obctrl_status)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_ASL_OBCTRL_LEN];
|
||||
_mav_put_uint64_t(buf, 0, timestamp);
|
||||
_mav_put_float(buf, 8, uElev);
|
||||
_mav_put_float(buf, 12, uThrot);
|
||||
_mav_put_float(buf, 16, uThrot2);
|
||||
_mav_put_float(buf, 20, uAilL);
|
||||
_mav_put_float(buf, 24, uAilR);
|
||||
_mav_put_float(buf, 28, uRud);
|
||||
_mav_put_uint8_t(buf, 32, obctrl_status);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ASL_OBCTRL_LEN);
|
||||
#else
|
||||
mavlink_asl_obctrl_t packet;
|
||||
packet.timestamp = timestamp;
|
||||
packet.uElev = uElev;
|
||||
packet.uThrot = uThrot;
|
||||
packet.uThrot2 = uThrot2;
|
||||
packet.uAilL = uAilL;
|
||||
packet.uAilR = uAilR;
|
||||
packet.uRud = uRud;
|
||||
packet.obctrl_status = obctrl_status;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ASL_OBCTRL_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_ASL_OBCTRL;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ASL_OBCTRL_MIN_LEN, MAVLINK_MSG_ID_ASL_OBCTRL_LEN, MAVLINK_MSG_ID_ASL_OBCTRL_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ASL_OBCTRL_MIN_LEN, MAVLINK_MSG_ID_ASL_OBCTRL_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a asl_obctrl message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -182,6 +236,20 @@ static inline uint16_t mavlink_msg_asl_obctrl_encode_chan(uint8_t system_id, uin
|
||||
return mavlink_msg_asl_obctrl_pack_chan(system_id, component_id, chan, msg, asl_obctrl->timestamp, asl_obctrl->uElev, asl_obctrl->uThrot, asl_obctrl->uThrot2, asl_obctrl->uAilL, asl_obctrl->uAilR, asl_obctrl->uRud, asl_obctrl->obctrl_status);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a asl_obctrl struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param asl_obctrl C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_asl_obctrl_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_asl_obctrl_t* asl_obctrl)
|
||||
{
|
||||
return mavlink_msg_asl_obctrl_pack_status(system_id, component_id, _status, msg, asl_obctrl->timestamp, asl_obctrl->uElev, asl_obctrl->uThrot, asl_obctrl->uThrot2, asl_obctrl->uAilL, asl_obctrl->uAilR, asl_obctrl->uRud, asl_obctrl->obctrl_status);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a asl_obctrl message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -207,6 +207,111 @@ static inline uint16_t mavlink_msg_aslctrl_data_pack(uint8_t system_id, uint8_t
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ASLCTRL_DATA_MIN_LEN, MAVLINK_MSG_ID_ASLCTRL_DATA_LEN, MAVLINK_MSG_ID_ASLCTRL_DATA_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a aslctrl_data message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param timestamp [us] Timestamp
|
||||
* @param aslctrl_mode ASLCTRL control-mode (manual, stabilized, auto, etc...)
|
||||
* @param h See sourcecode for a description of these values...
|
||||
* @param hRef
|
||||
* @param hRef_t
|
||||
* @param PitchAngle [deg] Pitch angle
|
||||
* @param PitchAngleRef [deg] Pitch angle reference
|
||||
* @param q
|
||||
* @param qRef
|
||||
* @param uElev
|
||||
* @param uThrot
|
||||
* @param uThrot2
|
||||
* @param nZ
|
||||
* @param AirspeedRef [m/s] Airspeed reference
|
||||
* @param SpoilersEngaged
|
||||
* @param YawAngle [deg] Yaw angle
|
||||
* @param YawAngleRef [deg] Yaw angle reference
|
||||
* @param RollAngle [deg] Roll angle
|
||||
* @param RollAngleRef [deg] Roll angle reference
|
||||
* @param p
|
||||
* @param pRef
|
||||
* @param r
|
||||
* @param rRef
|
||||
* @param uAil
|
||||
* @param uRud
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_aslctrl_data_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint64_t timestamp, uint8_t aslctrl_mode, float h, float hRef, float hRef_t, float PitchAngle, float PitchAngleRef, float q, float qRef, float uElev, float uThrot, float uThrot2, float nZ, float AirspeedRef, uint8_t SpoilersEngaged, float YawAngle, float YawAngleRef, float RollAngle, float RollAngleRef, float p, float pRef, float r, float rRef, float uAil, float uRud)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_ASLCTRL_DATA_LEN];
|
||||
_mav_put_uint64_t(buf, 0, timestamp);
|
||||
_mav_put_float(buf, 8, h);
|
||||
_mav_put_float(buf, 12, hRef);
|
||||
_mav_put_float(buf, 16, hRef_t);
|
||||
_mav_put_float(buf, 20, PitchAngle);
|
||||
_mav_put_float(buf, 24, PitchAngleRef);
|
||||
_mav_put_float(buf, 28, q);
|
||||
_mav_put_float(buf, 32, qRef);
|
||||
_mav_put_float(buf, 36, uElev);
|
||||
_mav_put_float(buf, 40, uThrot);
|
||||
_mav_put_float(buf, 44, uThrot2);
|
||||
_mav_put_float(buf, 48, nZ);
|
||||
_mav_put_float(buf, 52, AirspeedRef);
|
||||
_mav_put_float(buf, 56, YawAngle);
|
||||
_mav_put_float(buf, 60, YawAngleRef);
|
||||
_mav_put_float(buf, 64, RollAngle);
|
||||
_mav_put_float(buf, 68, RollAngleRef);
|
||||
_mav_put_float(buf, 72, p);
|
||||
_mav_put_float(buf, 76, pRef);
|
||||
_mav_put_float(buf, 80, r);
|
||||
_mav_put_float(buf, 84, rRef);
|
||||
_mav_put_float(buf, 88, uAil);
|
||||
_mav_put_float(buf, 92, uRud);
|
||||
_mav_put_uint8_t(buf, 96, aslctrl_mode);
|
||||
_mav_put_uint8_t(buf, 97, SpoilersEngaged);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ASLCTRL_DATA_LEN);
|
||||
#else
|
||||
mavlink_aslctrl_data_t packet;
|
||||
packet.timestamp = timestamp;
|
||||
packet.h = h;
|
||||
packet.hRef = hRef;
|
||||
packet.hRef_t = hRef_t;
|
||||
packet.PitchAngle = PitchAngle;
|
||||
packet.PitchAngleRef = PitchAngleRef;
|
||||
packet.q = q;
|
||||
packet.qRef = qRef;
|
||||
packet.uElev = uElev;
|
||||
packet.uThrot = uThrot;
|
||||
packet.uThrot2 = uThrot2;
|
||||
packet.nZ = nZ;
|
||||
packet.AirspeedRef = AirspeedRef;
|
||||
packet.YawAngle = YawAngle;
|
||||
packet.YawAngleRef = YawAngleRef;
|
||||
packet.RollAngle = RollAngle;
|
||||
packet.RollAngleRef = RollAngleRef;
|
||||
packet.p = p;
|
||||
packet.pRef = pRef;
|
||||
packet.r = r;
|
||||
packet.rRef = rRef;
|
||||
packet.uAil = uAil;
|
||||
packet.uRud = uRud;
|
||||
packet.aslctrl_mode = aslctrl_mode;
|
||||
packet.SpoilersEngaged = SpoilersEngaged;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ASLCTRL_DATA_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_ASLCTRL_DATA;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ASLCTRL_DATA_MIN_LEN, MAVLINK_MSG_ID_ASLCTRL_DATA_LEN, MAVLINK_MSG_ID_ASLCTRL_DATA_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ASLCTRL_DATA_MIN_LEN, MAVLINK_MSG_ID_ASLCTRL_DATA_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a aslctrl_data message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -335,6 +440,20 @@ static inline uint16_t mavlink_msg_aslctrl_data_encode_chan(uint8_t system_id, u
|
||||
return mavlink_msg_aslctrl_data_pack_chan(system_id, component_id, chan, msg, aslctrl_data->timestamp, aslctrl_data->aslctrl_mode, aslctrl_data->h, aslctrl_data->hRef, aslctrl_data->hRef_t, aslctrl_data->PitchAngle, aslctrl_data->PitchAngleRef, aslctrl_data->q, aslctrl_data->qRef, aslctrl_data->uElev, aslctrl_data->uThrot, aslctrl_data->uThrot2, aslctrl_data->nZ, aslctrl_data->AirspeedRef, aslctrl_data->SpoilersEngaged, aslctrl_data->YawAngle, aslctrl_data->YawAngleRef, aslctrl_data->RollAngle, aslctrl_data->RollAngleRef, aslctrl_data->p, aslctrl_data->pRef, aslctrl_data->r, aslctrl_data->rRef, aslctrl_data->uAil, aslctrl_data->uRud);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a aslctrl_data struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param aslctrl_data C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_aslctrl_data_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_aslctrl_data_t* aslctrl_data)
|
||||
{
|
||||
return mavlink_msg_aslctrl_data_pack_status(system_id, component_id, _status, msg, aslctrl_data->timestamp, aslctrl_data->aslctrl_mode, aslctrl_data->h, aslctrl_data->hRef, aslctrl_data->hRef_t, aslctrl_data->PitchAngle, aslctrl_data->PitchAngleRef, aslctrl_data->q, aslctrl_data->qRef, aslctrl_data->uElev, aslctrl_data->uThrot, aslctrl_data->uThrot2, aslctrl_data->nZ, aslctrl_data->AirspeedRef, aslctrl_data->SpoilersEngaged, aslctrl_data->YawAngle, aslctrl_data->YawAngleRef, aslctrl_data->RollAngle, aslctrl_data->RollAngleRef, aslctrl_data->p, aslctrl_data->pRef, aslctrl_data->r, aslctrl_data->rRef, aslctrl_data->uAil, aslctrl_data->uRud);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a aslctrl_data message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -123,6 +123,69 @@ static inline uint16_t mavlink_msg_aslctrl_debug_pack(uint8_t system_id, uint8_t
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ASLCTRL_DEBUG_MIN_LEN, MAVLINK_MSG_ID_ASLCTRL_DEBUG_LEN, MAVLINK_MSG_ID_ASLCTRL_DEBUG_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a aslctrl_debug message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param i32_1 Debug data
|
||||
* @param i8_1 Debug data
|
||||
* @param i8_2 Debug data
|
||||
* @param f_1 Debug data
|
||||
* @param f_2 Debug data
|
||||
* @param f_3 Debug data
|
||||
* @param f_4 Debug data
|
||||
* @param f_5 Debug data
|
||||
* @param f_6 Debug data
|
||||
* @param f_7 Debug data
|
||||
* @param f_8 Debug data
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_aslctrl_debug_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint32_t i32_1, uint8_t i8_1, uint8_t i8_2, float f_1, float f_2, float f_3, float f_4, float f_5, float f_6, float f_7, float f_8)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_ASLCTRL_DEBUG_LEN];
|
||||
_mav_put_uint32_t(buf, 0, i32_1);
|
||||
_mav_put_float(buf, 4, f_1);
|
||||
_mav_put_float(buf, 8, f_2);
|
||||
_mav_put_float(buf, 12, f_3);
|
||||
_mav_put_float(buf, 16, f_4);
|
||||
_mav_put_float(buf, 20, f_5);
|
||||
_mav_put_float(buf, 24, f_6);
|
||||
_mav_put_float(buf, 28, f_7);
|
||||
_mav_put_float(buf, 32, f_8);
|
||||
_mav_put_uint8_t(buf, 36, i8_1);
|
||||
_mav_put_uint8_t(buf, 37, i8_2);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ASLCTRL_DEBUG_LEN);
|
||||
#else
|
||||
mavlink_aslctrl_debug_t packet;
|
||||
packet.i32_1 = i32_1;
|
||||
packet.f_1 = f_1;
|
||||
packet.f_2 = f_2;
|
||||
packet.f_3 = f_3;
|
||||
packet.f_4 = f_4;
|
||||
packet.f_5 = f_5;
|
||||
packet.f_6 = f_6;
|
||||
packet.f_7 = f_7;
|
||||
packet.f_8 = f_8;
|
||||
packet.i8_1 = i8_1;
|
||||
packet.i8_2 = i8_2;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ASLCTRL_DEBUG_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_ASLCTRL_DEBUG;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ASLCTRL_DEBUG_MIN_LEN, MAVLINK_MSG_ID_ASLCTRL_DEBUG_LEN, MAVLINK_MSG_ID_ASLCTRL_DEBUG_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ASLCTRL_DEBUG_MIN_LEN, MAVLINK_MSG_ID_ASLCTRL_DEBUG_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a aslctrl_debug message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -209,6 +272,20 @@ static inline uint16_t mavlink_msg_aslctrl_debug_encode_chan(uint8_t system_id,
|
||||
return mavlink_msg_aslctrl_debug_pack_chan(system_id, component_id, chan, msg, aslctrl_debug->i32_1, aslctrl_debug->i8_1, aslctrl_debug->i8_2, aslctrl_debug->f_1, aslctrl_debug->f_2, aslctrl_debug->f_3, aslctrl_debug->f_4, aslctrl_debug->f_5, aslctrl_debug->f_6, aslctrl_debug->f_7, aslctrl_debug->f_8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a aslctrl_debug struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param aslctrl_debug C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_aslctrl_debug_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_aslctrl_debug_t* aslctrl_debug)
|
||||
{
|
||||
return mavlink_msg_aslctrl_debug_pack_status(system_id, component_id, _status, msg, aslctrl_debug->i32_1, aslctrl_debug->i8_1, aslctrl_debug->i8_2, aslctrl_debug->f_1, aslctrl_debug->f_2, aslctrl_debug->f_3, aslctrl_debug->f_4, aslctrl_debug->f_5, aslctrl_debug->f_6, aslctrl_debug->f_7, aslctrl_debug->f_8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a aslctrl_debug message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -79,6 +79,46 @@ static inline uint16_t mavlink_msg_asluav_status_pack(uint8_t system_id, uint8_t
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ASLUAV_STATUS_MIN_LEN, MAVLINK_MSG_ID_ASLUAV_STATUS_LEN, MAVLINK_MSG_ID_ASLUAV_STATUS_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a asluav_status message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param LED_status Status of the position-indicator LEDs
|
||||
* @param SATCOM_status Status of the IRIDIUM satellite communication system
|
||||
* @param Servo_status Status vector for up to 8 servos
|
||||
* @param Motor_rpm Motor RPM
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_asluav_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t LED_status, uint8_t SATCOM_status, const uint8_t *Servo_status, float Motor_rpm)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_ASLUAV_STATUS_LEN];
|
||||
_mav_put_float(buf, 0, Motor_rpm);
|
||||
_mav_put_uint8_t(buf, 4, LED_status);
|
||||
_mav_put_uint8_t(buf, 5, SATCOM_status);
|
||||
_mav_put_uint8_t_array(buf, 6, Servo_status, 8);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ASLUAV_STATUS_LEN);
|
||||
#else
|
||||
mavlink_asluav_status_t packet;
|
||||
packet.Motor_rpm = Motor_rpm;
|
||||
packet.LED_status = LED_status;
|
||||
packet.SATCOM_status = SATCOM_status;
|
||||
mav_array_memcpy(packet.Servo_status, Servo_status, sizeof(uint8_t)*8);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ASLUAV_STATUS_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_ASLUAV_STATUS;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ASLUAV_STATUS_MIN_LEN, MAVLINK_MSG_ID_ASLUAV_STATUS_LEN, MAVLINK_MSG_ID_ASLUAV_STATUS_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ASLUAV_STATUS_MIN_LEN, MAVLINK_MSG_ID_ASLUAV_STATUS_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a asluav_status message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -142,6 +182,20 @@ static inline uint16_t mavlink_msg_asluav_status_encode_chan(uint8_t system_id,
|
||||
return mavlink_msg_asluav_status_pack_chan(system_id, component_id, chan, msg, asluav_status->LED_status, asluav_status->SATCOM_status, asluav_status->Servo_status, asluav_status->Motor_rpm);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a asluav_status struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param asluav_status C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_asluav_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_asluav_status_t* asluav_status)
|
||||
{
|
||||
return mavlink_msg_asluav_status_pack_status(system_id, component_id, _status, msg, asluav_status->LED_status, asluav_status->SATCOM_status, asluav_status->Servo_status, asluav_status->Motor_rpm);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a asluav_status message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -147,6 +147,81 @@ static inline uint16_t mavlink_msg_command_int_stamped_pack(uint8_t system_id, u
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_MIN_LEN, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_LEN, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a command_int_stamped message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param utc_time UTC time, seconds elapsed since 01.01.1970
|
||||
* @param vehicle_timestamp Microseconds elapsed since vehicle boot
|
||||
* @param target_system System ID
|
||||
* @param target_component Component ID
|
||||
* @param frame The coordinate system of the COMMAND, as defined by MAV_FRAME enum
|
||||
* @param command The scheduled action for the mission item, as defined by MAV_CMD enum
|
||||
* @param current false:0, true:1
|
||||
* @param autocontinue autocontinue to next wp
|
||||
* @param param1 PARAM1, see MAV_CMD enum
|
||||
* @param param2 PARAM2, see MAV_CMD enum
|
||||
* @param param3 PARAM3, see MAV_CMD enum
|
||||
* @param param4 PARAM4, see MAV_CMD enum
|
||||
* @param x PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7
|
||||
* @param y PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7
|
||||
* @param z PARAM7 / z position: global: altitude in meters (MSL, WGS84, AGL or relative to home - depending on frame).
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_command_int_stamped_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint32_t utc_time, uint64_t vehicle_timestamp, uint8_t target_system, uint8_t target_component, uint8_t frame, uint16_t command, uint8_t current, uint8_t autocontinue, float param1, float param2, float param3, float param4, int32_t x, int32_t y, float z)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_COMMAND_INT_STAMPED_LEN];
|
||||
_mav_put_uint64_t(buf, 0, vehicle_timestamp);
|
||||
_mav_put_uint32_t(buf, 8, utc_time);
|
||||
_mav_put_float(buf, 12, param1);
|
||||
_mav_put_float(buf, 16, param2);
|
||||
_mav_put_float(buf, 20, param3);
|
||||
_mav_put_float(buf, 24, param4);
|
||||
_mav_put_int32_t(buf, 28, x);
|
||||
_mav_put_int32_t(buf, 32, y);
|
||||
_mav_put_float(buf, 36, z);
|
||||
_mav_put_uint16_t(buf, 40, command);
|
||||
_mav_put_uint8_t(buf, 42, target_system);
|
||||
_mav_put_uint8_t(buf, 43, target_component);
|
||||
_mav_put_uint8_t(buf, 44, frame);
|
||||
_mav_put_uint8_t(buf, 45, current);
|
||||
_mav_put_uint8_t(buf, 46, autocontinue);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_LEN);
|
||||
#else
|
||||
mavlink_command_int_stamped_t packet;
|
||||
packet.vehicle_timestamp = vehicle_timestamp;
|
||||
packet.utc_time = utc_time;
|
||||
packet.param1 = param1;
|
||||
packet.param2 = param2;
|
||||
packet.param3 = param3;
|
||||
packet.param4 = param4;
|
||||
packet.x = x;
|
||||
packet.y = y;
|
||||
packet.z = z;
|
||||
packet.command = command;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
packet.frame = frame;
|
||||
packet.current = current;
|
||||
packet.autocontinue = autocontinue;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_COMMAND_INT_STAMPED;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_MIN_LEN, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_LEN, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_MIN_LEN, MAVLINK_MSG_ID_COMMAND_INT_STAMPED_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a command_int_stamped message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -245,6 +320,20 @@ static inline uint16_t mavlink_msg_command_int_stamped_encode_chan(uint8_t syste
|
||||
return mavlink_msg_command_int_stamped_pack_chan(system_id, component_id, chan, msg, command_int_stamped->utc_time, command_int_stamped->vehicle_timestamp, command_int_stamped->target_system, command_int_stamped->target_component, command_int_stamped->frame, command_int_stamped->command, command_int_stamped->current, command_int_stamped->autocontinue, command_int_stamped->param1, command_int_stamped->param2, command_int_stamped->param3, command_int_stamped->param4, command_int_stamped->x, command_int_stamped->y, command_int_stamped->z);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a command_int_stamped struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param command_int_stamped C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_command_int_stamped_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_command_int_stamped_t* command_int_stamped)
|
||||
{
|
||||
return mavlink_msg_command_int_stamped_pack_status(system_id, component_id, _status, msg, command_int_stamped->utc_time, command_int_stamped->vehicle_timestamp, command_int_stamped->target_system, command_int_stamped->target_component, command_int_stamped->frame, command_int_stamped->command, command_int_stamped->current, command_int_stamped->autocontinue, command_int_stamped->param1, command_int_stamped->param2, command_int_stamped->param3, command_int_stamped->param4, command_int_stamped->x, command_int_stamped->y, command_int_stamped->z);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a command_int_stamped message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -135,6 +135,75 @@ static inline uint16_t mavlink_msg_command_long_stamped_pack(uint8_t system_id,
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_MIN_LEN, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_LEN, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a command_long_stamped message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param utc_time UTC time, seconds elapsed since 01.01.1970
|
||||
* @param vehicle_timestamp Microseconds elapsed since vehicle boot
|
||||
* @param target_system System which should execute the command
|
||||
* @param target_component Component which should execute the command, 0 for all components
|
||||
* @param command Command ID, as defined by MAV_CMD enum.
|
||||
* @param confirmation 0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)
|
||||
* @param param1 Parameter 1, as defined by MAV_CMD enum.
|
||||
* @param param2 Parameter 2, as defined by MAV_CMD enum.
|
||||
* @param param3 Parameter 3, as defined by MAV_CMD enum.
|
||||
* @param param4 Parameter 4, as defined by MAV_CMD enum.
|
||||
* @param param5 Parameter 5, as defined by MAV_CMD enum.
|
||||
* @param param6 Parameter 6, as defined by MAV_CMD enum.
|
||||
* @param param7 Parameter 7, as defined by MAV_CMD enum.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_command_long_stamped_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint32_t utc_time, uint64_t vehicle_timestamp, uint8_t target_system, uint8_t target_component, uint16_t command, uint8_t confirmation, float param1, float param2, float param3, float param4, float param5, float param6, float param7)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_LEN];
|
||||
_mav_put_uint64_t(buf, 0, vehicle_timestamp);
|
||||
_mav_put_uint32_t(buf, 8, utc_time);
|
||||
_mav_put_float(buf, 12, param1);
|
||||
_mav_put_float(buf, 16, param2);
|
||||
_mav_put_float(buf, 20, param3);
|
||||
_mav_put_float(buf, 24, param4);
|
||||
_mav_put_float(buf, 28, param5);
|
||||
_mav_put_float(buf, 32, param6);
|
||||
_mav_put_float(buf, 36, param7);
|
||||
_mav_put_uint16_t(buf, 40, command);
|
||||
_mav_put_uint8_t(buf, 42, target_system);
|
||||
_mav_put_uint8_t(buf, 43, target_component);
|
||||
_mav_put_uint8_t(buf, 44, confirmation);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_LEN);
|
||||
#else
|
||||
mavlink_command_long_stamped_t packet;
|
||||
packet.vehicle_timestamp = vehicle_timestamp;
|
||||
packet.utc_time = utc_time;
|
||||
packet.param1 = param1;
|
||||
packet.param2 = param2;
|
||||
packet.param3 = param3;
|
||||
packet.param4 = param4;
|
||||
packet.param5 = param5;
|
||||
packet.param6 = param6;
|
||||
packet.param7 = param7;
|
||||
packet.command = command;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
packet.confirmation = confirmation;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_COMMAND_LONG_STAMPED;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_MIN_LEN, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_LEN, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_MIN_LEN, MAVLINK_MSG_ID_COMMAND_LONG_STAMPED_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a command_long_stamped message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -227,6 +296,20 @@ static inline uint16_t mavlink_msg_command_long_stamped_encode_chan(uint8_t syst
|
||||
return mavlink_msg_command_long_stamped_pack_chan(system_id, component_id, chan, msg, command_long_stamped->utc_time, command_long_stamped->vehicle_timestamp, command_long_stamped->target_system, command_long_stamped->target_component, command_long_stamped->command, command_long_stamped->confirmation, command_long_stamped->param1, command_long_stamped->param2, command_long_stamped->param3, command_long_stamped->param4, command_long_stamped->param5, command_long_stamped->param6, command_long_stamped->param7);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a command_long_stamped struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param command_long_stamped C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_command_long_stamped_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_command_long_stamped_t* command_long_stamped)
|
||||
{
|
||||
return mavlink_msg_command_long_stamped_pack_status(system_id, component_id, _status, msg, command_long_stamped->utc_time, command_long_stamped->vehicle_timestamp, command_long_stamped->target_system, command_long_stamped->target_component, command_long_stamped->command, command_long_stamped->confirmation, command_long_stamped->param1, command_long_stamped->param2, command_long_stamped->param3, command_long_stamped->param4, command_long_stamped->param5, command_long_stamped->param6, command_long_stamped->param7);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a command_long_stamped message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -99,6 +99,57 @@ static inline uint16_t mavlink_msg_ekf_ext_pack(uint8_t system_id, uint8_t compo
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_EKF_EXT_MIN_LEN, MAVLINK_MSG_ID_EKF_EXT_LEN, MAVLINK_MSG_ID_EKF_EXT_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a ekf_ext message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param timestamp [us] Time since system start
|
||||
* @param Windspeed [m/s] Magnitude of wind velocity (in lateral inertial plane)
|
||||
* @param WindDir [rad] Wind heading angle from North
|
||||
* @param WindZ [m/s] Z (Down) component of inertial wind velocity
|
||||
* @param Airspeed [m/s] Magnitude of air velocity
|
||||
* @param beta [rad] Sideslip angle
|
||||
* @param alpha [rad] Angle of attack
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_ekf_ext_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint64_t timestamp, float Windspeed, float WindDir, float WindZ, float Airspeed, float beta, float alpha)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_EKF_EXT_LEN];
|
||||
_mav_put_uint64_t(buf, 0, timestamp);
|
||||
_mav_put_float(buf, 8, Windspeed);
|
||||
_mav_put_float(buf, 12, WindDir);
|
||||
_mav_put_float(buf, 16, WindZ);
|
||||
_mav_put_float(buf, 20, Airspeed);
|
||||
_mav_put_float(buf, 24, beta);
|
||||
_mav_put_float(buf, 28, alpha);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_EKF_EXT_LEN);
|
||||
#else
|
||||
mavlink_ekf_ext_t packet;
|
||||
packet.timestamp = timestamp;
|
||||
packet.Windspeed = Windspeed;
|
||||
packet.WindDir = WindDir;
|
||||
packet.WindZ = WindZ;
|
||||
packet.Airspeed = Airspeed;
|
||||
packet.beta = beta;
|
||||
packet.alpha = alpha;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_EKF_EXT_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_EKF_EXT;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_EKF_EXT_MIN_LEN, MAVLINK_MSG_ID_EKF_EXT_LEN, MAVLINK_MSG_ID_EKF_EXT_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_EKF_EXT_MIN_LEN, MAVLINK_MSG_ID_EKF_EXT_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a ekf_ext message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -173,6 +224,20 @@ static inline uint16_t mavlink_msg_ekf_ext_encode_chan(uint8_t system_id, uint8_
|
||||
return mavlink_msg_ekf_ext_pack_chan(system_id, component_id, chan, msg, ekf_ext->timestamp, ekf_ext->Windspeed, ekf_ext->WindDir, ekf_ext->WindZ, ekf_ext->Airspeed, ekf_ext->beta, ekf_ext->alpha);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a ekf_ext struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param ekf_ext C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_ekf_ext_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_ekf_ext_t* ekf_ext)
|
||||
{
|
||||
return mavlink_msg_ekf_ext_pack_status(system_id, component_id, _status, msg, ekf_ext->timestamp, ekf_ext->Windspeed, ekf_ext->WindDir, ekf_ext->WindZ, ekf_ext->Airspeed, ekf_ext->beta, ekf_ext->alpha);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a ekf_ext message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -207,6 +207,111 @@ static inline uint16_t mavlink_msg_fw_soaring_data_pack(uint8_t system_id, uint8
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FW_SOARING_DATA_MIN_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a fw_soaring_data message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param timestamp [ms] Timestamp
|
||||
* @param timestampModeChanged [ms] Timestamp since last mode change
|
||||
* @param xW [m/s] Thermal core updraft strength
|
||||
* @param xR [m] Thermal radius
|
||||
* @param xLat [deg] Thermal center latitude
|
||||
* @param xLon [deg] Thermal center longitude
|
||||
* @param VarW Variance W
|
||||
* @param VarR Variance R
|
||||
* @param VarLat Variance Lat
|
||||
* @param VarLon Variance Lon
|
||||
* @param LoiterRadius [m] Suggested loiter radius
|
||||
* @param LoiterDirection Suggested loiter direction
|
||||
* @param DistToSoarPoint [m] Distance to soar point
|
||||
* @param vSinkExp [m/s] Expected sink rate at current airspeed, roll and throttle
|
||||
* @param z1_LocalUpdraftSpeed [m/s] Measurement / updraft speed at current/local airplane position
|
||||
* @param z2_DeltaRoll [deg] Measurement / roll angle tracking error
|
||||
* @param z1_exp Expected measurement 1
|
||||
* @param z2_exp Expected measurement 2
|
||||
* @param ThermalGSNorth [m/s] Thermal drift (from estimator prediction step only)
|
||||
* @param ThermalGSEast [m/s] Thermal drift (from estimator prediction step only)
|
||||
* @param TSE_dot [m/s] Total specific energy change (filtered)
|
||||
* @param DebugVar1 Debug variable 1
|
||||
* @param DebugVar2 Debug variable 2
|
||||
* @param ControlMode Control Mode [-]
|
||||
* @param valid Data valid [-]
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fw_soaring_data_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint64_t timestamp, uint64_t timestampModeChanged, float xW, float xR, float xLat, float xLon, float VarW, float VarR, float VarLat, float VarLon, float LoiterRadius, float LoiterDirection, float DistToSoarPoint, float vSinkExp, float z1_LocalUpdraftSpeed, float z2_DeltaRoll, float z1_exp, float z2_exp, float ThermalGSNorth, float ThermalGSEast, float TSE_dot, float DebugVar1, float DebugVar2, uint8_t ControlMode, uint8_t valid)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_FW_SOARING_DATA_LEN];
|
||||
_mav_put_uint64_t(buf, 0, timestamp);
|
||||
_mav_put_uint64_t(buf, 8, timestampModeChanged);
|
||||
_mav_put_float(buf, 16, xW);
|
||||
_mav_put_float(buf, 20, xR);
|
||||
_mav_put_float(buf, 24, xLat);
|
||||
_mav_put_float(buf, 28, xLon);
|
||||
_mav_put_float(buf, 32, VarW);
|
||||
_mav_put_float(buf, 36, VarR);
|
||||
_mav_put_float(buf, 40, VarLat);
|
||||
_mav_put_float(buf, 44, VarLon);
|
||||
_mav_put_float(buf, 48, LoiterRadius);
|
||||
_mav_put_float(buf, 52, LoiterDirection);
|
||||
_mav_put_float(buf, 56, DistToSoarPoint);
|
||||
_mav_put_float(buf, 60, vSinkExp);
|
||||
_mav_put_float(buf, 64, z1_LocalUpdraftSpeed);
|
||||
_mav_put_float(buf, 68, z2_DeltaRoll);
|
||||
_mav_put_float(buf, 72, z1_exp);
|
||||
_mav_put_float(buf, 76, z2_exp);
|
||||
_mav_put_float(buf, 80, ThermalGSNorth);
|
||||
_mav_put_float(buf, 84, ThermalGSEast);
|
||||
_mav_put_float(buf, 88, TSE_dot);
|
||||
_mav_put_float(buf, 92, DebugVar1);
|
||||
_mav_put_float(buf, 96, DebugVar2);
|
||||
_mav_put_uint8_t(buf, 100, ControlMode);
|
||||
_mav_put_uint8_t(buf, 101, valid);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN);
|
||||
#else
|
||||
mavlink_fw_soaring_data_t packet;
|
||||
packet.timestamp = timestamp;
|
||||
packet.timestampModeChanged = timestampModeChanged;
|
||||
packet.xW = xW;
|
||||
packet.xR = xR;
|
||||
packet.xLat = xLat;
|
||||
packet.xLon = xLon;
|
||||
packet.VarW = VarW;
|
||||
packet.VarR = VarR;
|
||||
packet.VarLat = VarLat;
|
||||
packet.VarLon = VarLon;
|
||||
packet.LoiterRadius = LoiterRadius;
|
||||
packet.LoiterDirection = LoiterDirection;
|
||||
packet.DistToSoarPoint = DistToSoarPoint;
|
||||
packet.vSinkExp = vSinkExp;
|
||||
packet.z1_LocalUpdraftSpeed = z1_LocalUpdraftSpeed;
|
||||
packet.z2_DeltaRoll = z2_DeltaRoll;
|
||||
packet.z1_exp = z1_exp;
|
||||
packet.z2_exp = z2_exp;
|
||||
packet.ThermalGSNorth = ThermalGSNorth;
|
||||
packet.ThermalGSEast = ThermalGSEast;
|
||||
packet.TSE_dot = TSE_dot;
|
||||
packet.DebugVar1 = DebugVar1;
|
||||
packet.DebugVar2 = DebugVar2;
|
||||
packet.ControlMode = ControlMode;
|
||||
packet.valid = valid;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_FW_SOARING_DATA;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FW_SOARING_DATA_MIN_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FW_SOARING_DATA_MIN_LEN, MAVLINK_MSG_ID_FW_SOARING_DATA_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a fw_soaring_data message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -335,6 +440,20 @@ static inline uint16_t mavlink_msg_fw_soaring_data_encode_chan(uint8_t system_id
|
||||
return mavlink_msg_fw_soaring_data_pack_chan(system_id, component_id, chan, msg, fw_soaring_data->timestamp, fw_soaring_data->timestampModeChanged, fw_soaring_data->xW, fw_soaring_data->xR, fw_soaring_data->xLat, fw_soaring_data->xLon, fw_soaring_data->VarW, fw_soaring_data->VarR, fw_soaring_data->VarLat, fw_soaring_data->VarLon, fw_soaring_data->LoiterRadius, fw_soaring_data->LoiterDirection, fw_soaring_data->DistToSoarPoint, fw_soaring_data->vSinkExp, fw_soaring_data->z1_LocalUpdraftSpeed, fw_soaring_data->z2_DeltaRoll, fw_soaring_data->z1_exp, fw_soaring_data->z2_exp, fw_soaring_data->ThermalGSNorth, fw_soaring_data->ThermalGSEast, fw_soaring_data->TSE_dot, fw_soaring_data->DebugVar1, fw_soaring_data->DebugVar2, fw_soaring_data->ControlMode, fw_soaring_data->valid);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a fw_soaring_data struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param fw_soaring_data C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fw_soaring_data_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_fw_soaring_data_t* fw_soaring_data)
|
||||
{
|
||||
return mavlink_msg_fw_soaring_data_pack_status(system_id, component_id, _status, msg, fw_soaring_data->timestamp, fw_soaring_data->timestampModeChanged, fw_soaring_data->xW, fw_soaring_data->xR, fw_soaring_data->xLat, fw_soaring_data->xLon, fw_soaring_data->VarW, fw_soaring_data->VarR, fw_soaring_data->VarLat, fw_soaring_data->VarLon, fw_soaring_data->LoiterRadius, fw_soaring_data->LoiterDirection, fw_soaring_data->DistToSoarPoint, fw_soaring_data->vSinkExp, fw_soaring_data->z1_LocalUpdraftSpeed, fw_soaring_data->z2_DeltaRoll, fw_soaring_data->z1_exp, fw_soaring_data->z2_exp, fw_soaring_data->ThermalGSNorth, fw_soaring_data->ThermalGSEast, fw_soaring_data->TSE_dot, fw_soaring_data->DebugVar1, fw_soaring_data->DebugVar2, fw_soaring_data->ControlMode, fw_soaring_data->valid);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a fw_soaring_data message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -99,6 +99,57 @@ static inline uint16_t mavlink_msg_gsm_link_status_pack(uint8_t system_id, uint8
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GSM_LINK_STATUS_MIN_LEN, MAVLINK_MSG_ID_GSM_LINK_STATUS_LEN, MAVLINK_MSG_ID_GSM_LINK_STATUS_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a gsm_link_status message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param timestamp [us] Timestamp (of OBC)
|
||||
* @param gsm_modem_type GSM modem used
|
||||
* @param gsm_link_type GSM link type
|
||||
* @param rssi RSSI as reported by modem (unconverted)
|
||||
* @param rsrp_rscp RSRP (LTE) or RSCP (WCDMA) as reported by modem (unconverted)
|
||||
* @param sinr_ecio SINR (LTE) or ECIO (WCDMA) as reported by modem (unconverted)
|
||||
* @param rsrq RSRQ (LTE only) as reported by modem (unconverted)
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gsm_link_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint64_t timestamp, uint8_t gsm_modem_type, uint8_t gsm_link_type, uint8_t rssi, uint8_t rsrp_rscp, uint8_t sinr_ecio, uint8_t rsrq)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_GSM_LINK_STATUS_LEN];
|
||||
_mav_put_uint64_t(buf, 0, timestamp);
|
||||
_mav_put_uint8_t(buf, 8, gsm_modem_type);
|
||||
_mav_put_uint8_t(buf, 9, gsm_link_type);
|
||||
_mav_put_uint8_t(buf, 10, rssi);
|
||||
_mav_put_uint8_t(buf, 11, rsrp_rscp);
|
||||
_mav_put_uint8_t(buf, 12, sinr_ecio);
|
||||
_mav_put_uint8_t(buf, 13, rsrq);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GSM_LINK_STATUS_LEN);
|
||||
#else
|
||||
mavlink_gsm_link_status_t packet;
|
||||
packet.timestamp = timestamp;
|
||||
packet.gsm_modem_type = gsm_modem_type;
|
||||
packet.gsm_link_type = gsm_link_type;
|
||||
packet.rssi = rssi;
|
||||
packet.rsrp_rscp = rsrp_rscp;
|
||||
packet.sinr_ecio = sinr_ecio;
|
||||
packet.rsrq = rsrq;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GSM_LINK_STATUS_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_GSM_LINK_STATUS;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_GSM_LINK_STATUS_MIN_LEN, MAVLINK_MSG_ID_GSM_LINK_STATUS_LEN, MAVLINK_MSG_ID_GSM_LINK_STATUS_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_GSM_LINK_STATUS_MIN_LEN, MAVLINK_MSG_ID_GSM_LINK_STATUS_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a gsm_link_status message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -173,6 +224,20 @@ static inline uint16_t mavlink_msg_gsm_link_status_encode_chan(uint8_t system_id
|
||||
return mavlink_msg_gsm_link_status_pack_chan(system_id, component_id, chan, msg, gsm_link_status->timestamp, gsm_link_status->gsm_modem_type, gsm_link_status->gsm_link_type, gsm_link_status->rssi, gsm_link_status->rsrp_rscp, gsm_link_status->sinr_ecio, gsm_link_status->rsrq);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a gsm_link_status struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param gsm_link_status C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gsm_link_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_gsm_link_status_t* gsm_link_status)
|
||||
{
|
||||
return mavlink_msg_gsm_link_status_pack_status(system_id, component_id, _status, msg, gsm_link_status->timestamp, gsm_link_status->gsm_modem_type, gsm_link_status->gsm_link_type, gsm_link_status->rssi, gsm_link_status->rsrp_rscp, gsm_link_status->sinr_ecio, gsm_link_status->rsrq);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a gsm_link_status message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -105,6 +105,60 @@ static inline uint16_t mavlink_msg_satcom_link_status_pack(uint8_t system_id, ui
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SATCOM_LINK_STATUS_MIN_LEN, MAVLINK_MSG_ID_SATCOM_LINK_STATUS_LEN, MAVLINK_MSG_ID_SATCOM_LINK_STATUS_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a satcom_link_status message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param timestamp [us] Timestamp
|
||||
* @param last_heartbeat [us] Timestamp of the last successful sbd session
|
||||
* @param failed_sessions Number of failed sessions
|
||||
* @param successful_sessions Number of successful sessions
|
||||
* @param signal_quality Signal quality
|
||||
* @param ring_pending Ring call pending
|
||||
* @param tx_session_pending Transmission session pending
|
||||
* @param rx_session_pending Receiving session pending
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_satcom_link_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint64_t timestamp, uint64_t last_heartbeat, uint16_t failed_sessions, uint16_t successful_sessions, uint8_t signal_quality, uint8_t ring_pending, uint8_t tx_session_pending, uint8_t rx_session_pending)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_SATCOM_LINK_STATUS_LEN];
|
||||
_mav_put_uint64_t(buf, 0, timestamp);
|
||||
_mav_put_uint64_t(buf, 8, last_heartbeat);
|
||||
_mav_put_uint16_t(buf, 16, failed_sessions);
|
||||
_mav_put_uint16_t(buf, 18, successful_sessions);
|
||||
_mav_put_uint8_t(buf, 20, signal_quality);
|
||||
_mav_put_uint8_t(buf, 21, ring_pending);
|
||||
_mav_put_uint8_t(buf, 22, tx_session_pending);
|
||||
_mav_put_uint8_t(buf, 23, rx_session_pending);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SATCOM_LINK_STATUS_LEN);
|
||||
#else
|
||||
mavlink_satcom_link_status_t packet;
|
||||
packet.timestamp = timestamp;
|
||||
packet.last_heartbeat = last_heartbeat;
|
||||
packet.failed_sessions = failed_sessions;
|
||||
packet.successful_sessions = successful_sessions;
|
||||
packet.signal_quality = signal_quality;
|
||||
packet.ring_pending = ring_pending;
|
||||
packet.tx_session_pending = tx_session_pending;
|
||||
packet.rx_session_pending = rx_session_pending;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SATCOM_LINK_STATUS_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_SATCOM_LINK_STATUS;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SATCOM_LINK_STATUS_MIN_LEN, MAVLINK_MSG_ID_SATCOM_LINK_STATUS_LEN, MAVLINK_MSG_ID_SATCOM_LINK_STATUS_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SATCOM_LINK_STATUS_MIN_LEN, MAVLINK_MSG_ID_SATCOM_LINK_STATUS_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a satcom_link_status message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -182,6 +236,20 @@ static inline uint16_t mavlink_msg_satcom_link_status_encode_chan(uint8_t system
|
||||
return mavlink_msg_satcom_link_status_pack_chan(system_id, component_id, chan, msg, satcom_link_status->timestamp, satcom_link_status->last_heartbeat, satcom_link_status->failed_sessions, satcom_link_status->successful_sessions, satcom_link_status->signal_quality, satcom_link_status->ring_pending, satcom_link_status->tx_session_pending, satcom_link_status->rx_session_pending);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a satcom_link_status struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param satcom_link_status C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_satcom_link_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_satcom_link_status_t* satcom_link_status)
|
||||
{
|
||||
return mavlink_msg_satcom_link_status_pack_status(system_id, component_id, _status, msg, satcom_link_status->timestamp, satcom_link_status->last_heartbeat, satcom_link_status->failed_sessions, satcom_link_status->successful_sessions, satcom_link_status->signal_quality, satcom_link_status->ring_pending, satcom_link_status->tx_session_pending, satcom_link_status->rx_session_pending);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a satcom_link_status message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -75,6 +75,45 @@ static inline uint16_t mavlink_msg_sens_atmos_pack(uint8_t system_id, uint8_t co
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SENS_ATMOS_MIN_LEN, MAVLINK_MSG_ID_SENS_ATMOS_LEN, MAVLINK_MSG_ID_SENS_ATMOS_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a sens_atmos message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param timestamp [us] Time since system boot
|
||||
* @param TempAmbient [degC] Ambient temperature
|
||||
* @param Humidity [%] Relative humidity
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_sens_atmos_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint64_t timestamp, float TempAmbient, float Humidity)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_SENS_ATMOS_LEN];
|
||||
_mav_put_uint64_t(buf, 0, timestamp);
|
||||
_mav_put_float(buf, 8, TempAmbient);
|
||||
_mav_put_float(buf, 12, Humidity);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SENS_ATMOS_LEN);
|
||||
#else
|
||||
mavlink_sens_atmos_t packet;
|
||||
packet.timestamp = timestamp;
|
||||
packet.TempAmbient = TempAmbient;
|
||||
packet.Humidity = Humidity;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SENS_ATMOS_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_SENS_ATMOS;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SENS_ATMOS_MIN_LEN, MAVLINK_MSG_ID_SENS_ATMOS_LEN, MAVLINK_MSG_ID_SENS_ATMOS_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SENS_ATMOS_MIN_LEN, MAVLINK_MSG_ID_SENS_ATMOS_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a sens_atmos message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -137,6 +176,20 @@ static inline uint16_t mavlink_msg_sens_atmos_encode_chan(uint8_t system_id, uin
|
||||
return mavlink_msg_sens_atmos_pack_chan(system_id, component_id, chan, msg, sens_atmos->timestamp, sens_atmos->TempAmbient, sens_atmos->Humidity);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a sens_atmos struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param sens_atmos C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_sens_atmos_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_sens_atmos_t* sens_atmos)
|
||||
{
|
||||
return mavlink_msg_sens_atmos_pack_status(system_id, component_id, _status, msg, sens_atmos->timestamp, sens_atmos->TempAmbient, sens_atmos->Humidity);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a sens_atmos message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -147,6 +147,81 @@ static inline uint16_t mavlink_msg_sens_batmon_pack(uint8_t system_id, uint8_t c
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SENS_BATMON_MIN_LEN, MAVLINK_MSG_ID_SENS_BATMON_LEN, MAVLINK_MSG_ID_SENS_BATMON_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a sens_batmon message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param batmon_timestamp [us] Time since system start
|
||||
* @param temperature [degC] Battery pack temperature
|
||||
* @param voltage [mV] Battery pack voltage
|
||||
* @param current [mA] Battery pack current
|
||||
* @param SoC Battery pack state-of-charge
|
||||
* @param batterystatus Battery monitor status report bits in Hex
|
||||
* @param serialnumber Battery monitor serial number in Hex
|
||||
* @param safetystatus Battery monitor safetystatus report bits in Hex
|
||||
* @param operationstatus Battery monitor operation status report bits in Hex
|
||||
* @param cellvoltage1 [mV] Battery pack cell 1 voltage
|
||||
* @param cellvoltage2 [mV] Battery pack cell 2 voltage
|
||||
* @param cellvoltage3 [mV] Battery pack cell 3 voltage
|
||||
* @param cellvoltage4 [mV] Battery pack cell 4 voltage
|
||||
* @param cellvoltage5 [mV] Battery pack cell 5 voltage
|
||||
* @param cellvoltage6 [mV] Battery pack cell 6 voltage
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_sens_batmon_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint64_t batmon_timestamp, float temperature, uint16_t voltage, int16_t current, uint8_t SoC, uint16_t batterystatus, uint16_t serialnumber, uint32_t safetystatus, uint32_t operationstatus, uint16_t cellvoltage1, uint16_t cellvoltage2, uint16_t cellvoltage3, uint16_t cellvoltage4, uint16_t cellvoltage5, uint16_t cellvoltage6)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_SENS_BATMON_LEN];
|
||||
_mav_put_uint64_t(buf, 0, batmon_timestamp);
|
||||
_mav_put_float(buf, 8, temperature);
|
||||
_mav_put_uint32_t(buf, 12, safetystatus);
|
||||
_mav_put_uint32_t(buf, 16, operationstatus);
|
||||
_mav_put_uint16_t(buf, 20, voltage);
|
||||
_mav_put_int16_t(buf, 22, current);
|
||||
_mav_put_uint16_t(buf, 24, batterystatus);
|
||||
_mav_put_uint16_t(buf, 26, serialnumber);
|
||||
_mav_put_uint16_t(buf, 28, cellvoltage1);
|
||||
_mav_put_uint16_t(buf, 30, cellvoltage2);
|
||||
_mav_put_uint16_t(buf, 32, cellvoltage3);
|
||||
_mav_put_uint16_t(buf, 34, cellvoltage4);
|
||||
_mav_put_uint16_t(buf, 36, cellvoltage5);
|
||||
_mav_put_uint16_t(buf, 38, cellvoltage6);
|
||||
_mav_put_uint8_t(buf, 40, SoC);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SENS_BATMON_LEN);
|
||||
#else
|
||||
mavlink_sens_batmon_t packet;
|
||||
packet.batmon_timestamp = batmon_timestamp;
|
||||
packet.temperature = temperature;
|
||||
packet.safetystatus = safetystatus;
|
||||
packet.operationstatus = operationstatus;
|
||||
packet.voltage = voltage;
|
||||
packet.current = current;
|
||||
packet.batterystatus = batterystatus;
|
||||
packet.serialnumber = serialnumber;
|
||||
packet.cellvoltage1 = cellvoltage1;
|
||||
packet.cellvoltage2 = cellvoltage2;
|
||||
packet.cellvoltage3 = cellvoltage3;
|
||||
packet.cellvoltage4 = cellvoltage4;
|
||||
packet.cellvoltage5 = cellvoltage5;
|
||||
packet.cellvoltage6 = cellvoltage6;
|
||||
packet.SoC = SoC;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SENS_BATMON_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_SENS_BATMON;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SENS_BATMON_MIN_LEN, MAVLINK_MSG_ID_SENS_BATMON_LEN, MAVLINK_MSG_ID_SENS_BATMON_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SENS_BATMON_MIN_LEN, MAVLINK_MSG_ID_SENS_BATMON_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a sens_batmon message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -245,6 +320,20 @@ static inline uint16_t mavlink_msg_sens_batmon_encode_chan(uint8_t system_id, ui
|
||||
return mavlink_msg_sens_batmon_pack_chan(system_id, component_id, chan, msg, sens_batmon->batmon_timestamp, sens_batmon->temperature, sens_batmon->voltage, sens_batmon->current, sens_batmon->SoC, sens_batmon->batterystatus, sens_batmon->serialnumber, sens_batmon->safetystatus, sens_batmon->operationstatus, sens_batmon->cellvoltage1, sens_batmon->cellvoltage2, sens_batmon->cellvoltage3, sens_batmon->cellvoltage4, sens_batmon->cellvoltage5, sens_batmon->cellvoltage6);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a sens_batmon struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param sens_batmon C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_sens_batmon_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_sens_batmon_t* sens_batmon)
|
||||
{
|
||||
return mavlink_msg_sens_batmon_pack_status(system_id, component_id, _status, msg, sens_batmon->batmon_timestamp, sens_batmon->temperature, sens_batmon->voltage, sens_batmon->current, sens_batmon->SoC, sens_batmon->batterystatus, sens_batmon->serialnumber, sens_batmon->safetystatus, sens_batmon->operationstatus, sens_batmon->cellvoltage1, sens_batmon->cellvoltage2, sens_batmon->cellvoltage3, sens_batmon->cellvoltage4, sens_batmon->cellvoltage5, sens_batmon->cellvoltage6);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a sens_batmon message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -135,6 +135,75 @@ static inline uint16_t mavlink_msg_sens_mppt_pack(uint8_t system_id, uint8_t com
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SENS_MPPT_MIN_LEN, MAVLINK_MSG_ID_SENS_MPPT_LEN, MAVLINK_MSG_ID_SENS_MPPT_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a sens_mppt message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param mppt_timestamp [us] MPPT last timestamp
|
||||
* @param mppt1_volt [V] MPPT1 voltage
|
||||
* @param mppt1_amp [A] MPPT1 current
|
||||
* @param mppt1_pwm [us] MPPT1 pwm
|
||||
* @param mppt1_status MPPT1 status
|
||||
* @param mppt2_volt [V] MPPT2 voltage
|
||||
* @param mppt2_amp [A] MPPT2 current
|
||||
* @param mppt2_pwm [us] MPPT2 pwm
|
||||
* @param mppt2_status MPPT2 status
|
||||
* @param mppt3_volt [V] MPPT3 voltage
|
||||
* @param mppt3_amp [A] MPPT3 current
|
||||
* @param mppt3_pwm [us] MPPT3 pwm
|
||||
* @param mppt3_status MPPT3 status
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_sens_mppt_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint64_t mppt_timestamp, float mppt1_volt, float mppt1_amp, uint16_t mppt1_pwm, uint8_t mppt1_status, float mppt2_volt, float mppt2_amp, uint16_t mppt2_pwm, uint8_t mppt2_status, float mppt3_volt, float mppt3_amp, uint16_t mppt3_pwm, uint8_t mppt3_status)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_SENS_MPPT_LEN];
|
||||
_mav_put_uint64_t(buf, 0, mppt_timestamp);
|
||||
_mav_put_float(buf, 8, mppt1_volt);
|
||||
_mav_put_float(buf, 12, mppt1_amp);
|
||||
_mav_put_float(buf, 16, mppt2_volt);
|
||||
_mav_put_float(buf, 20, mppt2_amp);
|
||||
_mav_put_float(buf, 24, mppt3_volt);
|
||||
_mav_put_float(buf, 28, mppt3_amp);
|
||||
_mav_put_uint16_t(buf, 32, mppt1_pwm);
|
||||
_mav_put_uint16_t(buf, 34, mppt2_pwm);
|
||||
_mav_put_uint16_t(buf, 36, mppt3_pwm);
|
||||
_mav_put_uint8_t(buf, 38, mppt1_status);
|
||||
_mav_put_uint8_t(buf, 39, mppt2_status);
|
||||
_mav_put_uint8_t(buf, 40, mppt3_status);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SENS_MPPT_LEN);
|
||||
#else
|
||||
mavlink_sens_mppt_t packet;
|
||||
packet.mppt_timestamp = mppt_timestamp;
|
||||
packet.mppt1_volt = mppt1_volt;
|
||||
packet.mppt1_amp = mppt1_amp;
|
||||
packet.mppt2_volt = mppt2_volt;
|
||||
packet.mppt2_amp = mppt2_amp;
|
||||
packet.mppt3_volt = mppt3_volt;
|
||||
packet.mppt3_amp = mppt3_amp;
|
||||
packet.mppt1_pwm = mppt1_pwm;
|
||||
packet.mppt2_pwm = mppt2_pwm;
|
||||
packet.mppt3_pwm = mppt3_pwm;
|
||||
packet.mppt1_status = mppt1_status;
|
||||
packet.mppt2_status = mppt2_status;
|
||||
packet.mppt3_status = mppt3_status;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SENS_MPPT_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_SENS_MPPT;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SENS_MPPT_MIN_LEN, MAVLINK_MSG_ID_SENS_MPPT_LEN, MAVLINK_MSG_ID_SENS_MPPT_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SENS_MPPT_MIN_LEN, MAVLINK_MSG_ID_SENS_MPPT_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a sens_mppt message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -227,6 +296,20 @@ static inline uint16_t mavlink_msg_sens_mppt_encode_chan(uint8_t system_id, uint
|
||||
return mavlink_msg_sens_mppt_pack_chan(system_id, component_id, chan, msg, sens_mppt->mppt_timestamp, sens_mppt->mppt1_volt, sens_mppt->mppt1_amp, sens_mppt->mppt1_pwm, sens_mppt->mppt1_status, sens_mppt->mppt2_volt, sens_mppt->mppt2_amp, sens_mppt->mppt2_pwm, sens_mppt->mppt2_status, sens_mppt->mppt3_volt, sens_mppt->mppt3_amp, sens_mppt->mppt3_pwm, sens_mppt->mppt3_status);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a sens_mppt struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param sens_mppt C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_sens_mppt_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_sens_mppt_t* sens_mppt)
|
||||
{
|
||||
return mavlink_msg_sens_mppt_pack_status(system_id, component_id, _status, msg, sens_mppt->mppt_timestamp, sens_mppt->mppt1_volt, sens_mppt->mppt1_amp, sens_mppt->mppt1_pwm, sens_mppt->mppt1_status, sens_mppt->mppt2_volt, sens_mppt->mppt2_amp, sens_mppt->mppt2_pwm, sens_mppt->mppt2_status, sens_mppt->mppt3_volt, sens_mppt->mppt3_amp, sens_mppt->mppt3_pwm, sens_mppt->mppt3_status);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a sens_mppt message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -81,6 +81,48 @@ static inline uint16_t mavlink_msg_sens_power_pack(uint8_t system_id, uint8_t co
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SENS_POWER_MIN_LEN, MAVLINK_MSG_ID_SENS_POWER_LEN, MAVLINK_MSG_ID_SENS_POWER_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a sens_power message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param adc121_vspb_volt [V] Power board voltage sensor reading
|
||||
* @param adc121_cspb_amp [A] Power board current sensor reading
|
||||
* @param adc121_cs1_amp [A] Board current sensor 1 reading
|
||||
* @param adc121_cs2_amp [A] Board current sensor 2 reading
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_sens_power_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
float adc121_vspb_volt, float adc121_cspb_amp, float adc121_cs1_amp, float adc121_cs2_amp)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_SENS_POWER_LEN];
|
||||
_mav_put_float(buf, 0, adc121_vspb_volt);
|
||||
_mav_put_float(buf, 4, adc121_cspb_amp);
|
||||
_mav_put_float(buf, 8, adc121_cs1_amp);
|
||||
_mav_put_float(buf, 12, adc121_cs2_amp);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SENS_POWER_LEN);
|
||||
#else
|
||||
mavlink_sens_power_t packet;
|
||||
packet.adc121_vspb_volt = adc121_vspb_volt;
|
||||
packet.adc121_cspb_amp = adc121_cspb_amp;
|
||||
packet.adc121_cs1_amp = adc121_cs1_amp;
|
||||
packet.adc121_cs2_amp = adc121_cs2_amp;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SENS_POWER_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_SENS_POWER;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SENS_POWER_MIN_LEN, MAVLINK_MSG_ID_SENS_POWER_LEN, MAVLINK_MSG_ID_SENS_POWER_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SENS_POWER_MIN_LEN, MAVLINK_MSG_ID_SENS_POWER_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a sens_power message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -146,6 +188,20 @@ static inline uint16_t mavlink_msg_sens_power_encode_chan(uint8_t system_id, uin
|
||||
return mavlink_msg_sens_power_pack_chan(system_id, component_id, chan, msg, sens_power->adc121_vspb_volt, sens_power->adc121_cspb_amp, sens_power->adc121_cs1_amp, sens_power->adc121_cs2_amp);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a sens_power struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param sens_power C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_sens_power_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_sens_power_t* sens_power)
|
||||
{
|
||||
return mavlink_msg_sens_power_pack_status(system_id, component_id, _status, msg, sens_power->adc121_vspb_volt, sens_power->adc121_cspb_amp, sens_power->adc121_cs1_amp, sens_power->adc121_cs2_amp);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a sens_power message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -129,6 +129,72 @@ static inline uint16_t mavlink_msg_sens_power_board_pack(uint8_t system_id, uint
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SENS_POWER_BOARD_MIN_LEN, MAVLINK_MSG_ID_SENS_POWER_BOARD_LEN, MAVLINK_MSG_ID_SENS_POWER_BOARD_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a sens_power_board message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param timestamp [us] Timestamp
|
||||
* @param pwr_brd_status Power board status register
|
||||
* @param pwr_brd_led_status Power board leds status
|
||||
* @param pwr_brd_system_volt [V] Power board system voltage
|
||||
* @param pwr_brd_servo_volt [V] Power board servo voltage
|
||||
* @param pwr_brd_digital_volt [V] Power board digital voltage
|
||||
* @param pwr_brd_mot_l_amp [A] Power board left motor current sensor
|
||||
* @param pwr_brd_mot_r_amp [A] Power board right motor current sensor
|
||||
* @param pwr_brd_analog_amp [A] Power board analog current sensor
|
||||
* @param pwr_brd_digital_amp [A] Power board digital current sensor
|
||||
* @param pwr_brd_ext_amp [A] Power board extension current sensor
|
||||
* @param pwr_brd_aux_amp [A] Power board aux current sensor
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_sens_power_board_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint64_t timestamp, uint8_t pwr_brd_status, uint8_t pwr_brd_led_status, float pwr_brd_system_volt, float pwr_brd_servo_volt, float pwr_brd_digital_volt, float pwr_brd_mot_l_amp, float pwr_brd_mot_r_amp, float pwr_brd_analog_amp, float pwr_brd_digital_amp, float pwr_brd_ext_amp, float pwr_brd_aux_amp)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_SENS_POWER_BOARD_LEN];
|
||||
_mav_put_uint64_t(buf, 0, timestamp);
|
||||
_mav_put_float(buf, 8, pwr_brd_system_volt);
|
||||
_mav_put_float(buf, 12, pwr_brd_servo_volt);
|
||||
_mav_put_float(buf, 16, pwr_brd_digital_volt);
|
||||
_mav_put_float(buf, 20, pwr_brd_mot_l_amp);
|
||||
_mav_put_float(buf, 24, pwr_brd_mot_r_amp);
|
||||
_mav_put_float(buf, 28, pwr_brd_analog_amp);
|
||||
_mav_put_float(buf, 32, pwr_brd_digital_amp);
|
||||
_mav_put_float(buf, 36, pwr_brd_ext_amp);
|
||||
_mav_put_float(buf, 40, pwr_brd_aux_amp);
|
||||
_mav_put_uint8_t(buf, 44, pwr_brd_status);
|
||||
_mav_put_uint8_t(buf, 45, pwr_brd_led_status);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SENS_POWER_BOARD_LEN);
|
||||
#else
|
||||
mavlink_sens_power_board_t packet;
|
||||
packet.timestamp = timestamp;
|
||||
packet.pwr_brd_system_volt = pwr_brd_system_volt;
|
||||
packet.pwr_brd_servo_volt = pwr_brd_servo_volt;
|
||||
packet.pwr_brd_digital_volt = pwr_brd_digital_volt;
|
||||
packet.pwr_brd_mot_l_amp = pwr_brd_mot_l_amp;
|
||||
packet.pwr_brd_mot_r_amp = pwr_brd_mot_r_amp;
|
||||
packet.pwr_brd_analog_amp = pwr_brd_analog_amp;
|
||||
packet.pwr_brd_digital_amp = pwr_brd_digital_amp;
|
||||
packet.pwr_brd_ext_amp = pwr_brd_ext_amp;
|
||||
packet.pwr_brd_aux_amp = pwr_brd_aux_amp;
|
||||
packet.pwr_brd_status = pwr_brd_status;
|
||||
packet.pwr_brd_led_status = pwr_brd_led_status;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SENS_POWER_BOARD_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_SENS_POWER_BOARD;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SENS_POWER_BOARD_MIN_LEN, MAVLINK_MSG_ID_SENS_POWER_BOARD_LEN, MAVLINK_MSG_ID_SENS_POWER_BOARD_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SENS_POWER_BOARD_MIN_LEN, MAVLINK_MSG_ID_SENS_POWER_BOARD_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a sens_power_board message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -218,6 +284,20 @@ static inline uint16_t mavlink_msg_sens_power_board_encode_chan(uint8_t system_i
|
||||
return mavlink_msg_sens_power_board_pack_chan(system_id, component_id, chan, msg, sens_power_board->timestamp, sens_power_board->pwr_brd_status, sens_power_board->pwr_brd_led_status, sens_power_board->pwr_brd_system_volt, sens_power_board->pwr_brd_servo_volt, sens_power_board->pwr_brd_digital_volt, sens_power_board->pwr_brd_mot_l_amp, sens_power_board->pwr_brd_mot_r_amp, sens_power_board->pwr_brd_analog_amp, sens_power_board->pwr_brd_digital_amp, sens_power_board->pwr_brd_ext_amp, sens_power_board->pwr_brd_aux_amp);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a sens_power_board struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param sens_power_board C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_sens_power_board_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_sens_power_board_t* sens_power_board)
|
||||
{
|
||||
return mavlink_msg_sens_power_board_pack_status(system_id, component_id, _status, msg, sens_power_board->timestamp, sens_power_board->pwr_brd_status, sens_power_board->pwr_brd_led_status, sens_power_board->pwr_brd_system_volt, sens_power_board->pwr_brd_servo_volt, sens_power_board->pwr_brd_digital_volt, sens_power_board->pwr_brd_mot_l_amp, sens_power_board->pwr_brd_mot_r_amp, sens_power_board->pwr_brd_analog_amp, sens_power_board->pwr_brd_digital_amp, sens_power_board->pwr_brd_ext_amp, sens_power_board->pwr_brd_aux_amp);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a sens_power_board message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -87,6 +87,51 @@ static inline uint16_t mavlink_msg_sensor_airflow_angles_pack(uint8_t system_id,
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SENSOR_AIRFLOW_ANGLES_MIN_LEN, MAVLINK_MSG_ID_SENSOR_AIRFLOW_ANGLES_LEN, MAVLINK_MSG_ID_SENSOR_AIRFLOW_ANGLES_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a sensor_airflow_angles message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param timestamp [us] Timestamp
|
||||
* @param angleofattack [deg] Angle of attack
|
||||
* @param angleofattack_valid Angle of attack measurement valid
|
||||
* @param sideslip [deg] Sideslip angle
|
||||
* @param sideslip_valid Sideslip angle measurement valid
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_sensor_airflow_angles_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint64_t timestamp, float angleofattack, uint8_t angleofattack_valid, float sideslip, uint8_t sideslip_valid)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_SENSOR_AIRFLOW_ANGLES_LEN];
|
||||
_mav_put_uint64_t(buf, 0, timestamp);
|
||||
_mav_put_float(buf, 8, angleofattack);
|
||||
_mav_put_float(buf, 12, sideslip);
|
||||
_mav_put_uint8_t(buf, 16, angleofattack_valid);
|
||||
_mav_put_uint8_t(buf, 17, sideslip_valid);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SENSOR_AIRFLOW_ANGLES_LEN);
|
||||
#else
|
||||
mavlink_sensor_airflow_angles_t packet;
|
||||
packet.timestamp = timestamp;
|
||||
packet.angleofattack = angleofattack;
|
||||
packet.sideslip = sideslip;
|
||||
packet.angleofattack_valid = angleofattack_valid;
|
||||
packet.sideslip_valid = sideslip_valid;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SENSOR_AIRFLOW_ANGLES_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_SENSOR_AIRFLOW_ANGLES;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SENSOR_AIRFLOW_ANGLES_MIN_LEN, MAVLINK_MSG_ID_SENSOR_AIRFLOW_ANGLES_LEN, MAVLINK_MSG_ID_SENSOR_AIRFLOW_ANGLES_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SENSOR_AIRFLOW_ANGLES_MIN_LEN, MAVLINK_MSG_ID_SENSOR_AIRFLOW_ANGLES_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a sensor_airflow_angles message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -155,6 +200,20 @@ static inline uint16_t mavlink_msg_sensor_airflow_angles_encode_chan(uint8_t sys
|
||||
return mavlink_msg_sensor_airflow_angles_pack_chan(system_id, component_id, chan, msg, sensor_airflow_angles->timestamp, sensor_airflow_angles->angleofattack, sensor_airflow_angles->angleofattack_valid, sensor_airflow_angles->sideslip, sensor_airflow_angles->sideslip_valid);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a sensor_airflow_angles struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param sensor_airflow_angles C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_sensor_airflow_angles_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_sensor_airflow_angles_t* sensor_airflow_angles)
|
||||
{
|
||||
return mavlink_msg_sensor_airflow_angles_pack_status(system_id, component_id, _status, msg, sensor_airflow_angles->timestamp, sensor_airflow_angles->angleofattack, sensor_airflow_angles->angleofattack_valid, sensor_airflow_angles->sideslip, sensor_airflow_angles->sideslip_valid);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a sensor_airflow_angles message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -105,6 +105,60 @@ static inline uint16_t mavlink_msg_sensorpod_status_pack(uint8_t system_id, uint
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SENSORPOD_STATUS_MIN_LEN, MAVLINK_MSG_ID_SENSORPOD_STATUS_LEN, MAVLINK_MSG_ID_SENSORPOD_STATUS_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a sensorpod_status message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param timestamp [ms] Timestamp in linuxtime (since 1.1.1970)
|
||||
* @param visensor_rate_1 Rate of ROS topic 1
|
||||
* @param visensor_rate_2 Rate of ROS topic 2
|
||||
* @param visensor_rate_3 Rate of ROS topic 3
|
||||
* @param visensor_rate_4 Rate of ROS topic 4
|
||||
* @param recording_nodes_count Number of recording nodes
|
||||
* @param cpu_temp [degC] Temperature of sensorpod CPU in
|
||||
* @param free_space Free space available in recordings directory in [Gb] * 1e2
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_sensorpod_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint64_t timestamp, uint8_t visensor_rate_1, uint8_t visensor_rate_2, uint8_t visensor_rate_3, uint8_t visensor_rate_4, uint8_t recording_nodes_count, uint8_t cpu_temp, uint16_t free_space)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_SENSORPOD_STATUS_LEN];
|
||||
_mav_put_uint64_t(buf, 0, timestamp);
|
||||
_mav_put_uint16_t(buf, 8, free_space);
|
||||
_mav_put_uint8_t(buf, 10, visensor_rate_1);
|
||||
_mav_put_uint8_t(buf, 11, visensor_rate_2);
|
||||
_mav_put_uint8_t(buf, 12, visensor_rate_3);
|
||||
_mav_put_uint8_t(buf, 13, visensor_rate_4);
|
||||
_mav_put_uint8_t(buf, 14, recording_nodes_count);
|
||||
_mav_put_uint8_t(buf, 15, cpu_temp);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SENSORPOD_STATUS_LEN);
|
||||
#else
|
||||
mavlink_sensorpod_status_t packet;
|
||||
packet.timestamp = timestamp;
|
||||
packet.free_space = free_space;
|
||||
packet.visensor_rate_1 = visensor_rate_1;
|
||||
packet.visensor_rate_2 = visensor_rate_2;
|
||||
packet.visensor_rate_3 = visensor_rate_3;
|
||||
packet.visensor_rate_4 = visensor_rate_4;
|
||||
packet.recording_nodes_count = recording_nodes_count;
|
||||
packet.cpu_temp = cpu_temp;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SENSORPOD_STATUS_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_SENSORPOD_STATUS;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SENSORPOD_STATUS_MIN_LEN, MAVLINK_MSG_ID_SENSORPOD_STATUS_LEN, MAVLINK_MSG_ID_SENSORPOD_STATUS_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SENSORPOD_STATUS_MIN_LEN, MAVLINK_MSG_ID_SENSORPOD_STATUS_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a sensorpod_status message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -182,6 +236,20 @@ static inline uint16_t mavlink_msg_sensorpod_status_encode_chan(uint8_t system_i
|
||||
return mavlink_msg_sensorpod_status_pack_chan(system_id, component_id, chan, msg, sensorpod_status->timestamp, sensorpod_status->visensor_rate_1, sensorpod_status->visensor_rate_2, sensorpod_status->visensor_rate_3, sensorpod_status->visensor_rate_4, sensorpod_status->recording_nodes_count, sensorpod_status->cpu_temp, sensorpod_status->free_space);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a sensorpod_status struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param sensorpod_status C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_sensorpod_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_sensorpod_status_t* sensorpod_status)
|
||||
{
|
||||
return mavlink_msg_sensorpod_status_pack_status(system_id, component_id, _status, msg, sensorpod_status->timestamp, sensorpod_status->visensor_rate_1, sensorpod_status->visensor_rate_2, sensorpod_status->visensor_rate_3, sensorpod_status->visensor_rate_4, sensorpod_status->recording_nodes_count, sensorpod_status->cpu_temp, sensorpod_status->free_space);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a sensorpod_status message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Mon Mar 04 2024"
|
||||
#define MAVLINK_BUILD_DATE "Wed Mar 06 2024"
|
||||
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
|
||||
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
|
||||
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
#error Wrong include order: MAVLINK_AVSSUAS.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
|
||||
#endif
|
||||
|
||||
#define MAVLINK_AVSSUAS_XML_HASH -2785841859254114697
|
||||
#define MAVLINK_AVSSUAS_XML_HASH 6850650851455588663
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#ifndef MAVLINK_H
|
||||
#define MAVLINK_H
|
||||
|
||||
#define MAVLINK_PRIMARY_XML_HASH -2785841859254114697
|
||||
#define MAVLINK_PRIMARY_XML_HASH 6850650851455588663
|
||||
|
||||
#ifndef MAVLINK_STX
|
||||
#define MAVLINK_STX 253
|
||||
|
||||
@@ -123,6 +123,69 @@ static inline uint16_t mavlink_msg_avss_drone_imu_pack(uint8_t system_id, uint8_
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AVSS_DRONE_IMU_MIN_LEN, MAVLINK_MSG_ID_AVSS_DRONE_IMU_LEN, MAVLINK_MSG_ID_AVSS_DRONE_IMU_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a avss_drone_imu message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param time_boot_ms [ms] Timestamp (time since FC boot).
|
||||
* @param q1 Quaternion component 1, w (1 in null-rotation)
|
||||
* @param q2 Quaternion component 2, x (0 in null-rotation)
|
||||
* @param q3 Quaternion component 3, y (0 in null-rotation)
|
||||
* @param q4 Quaternion component 4, z (0 in null-rotation)
|
||||
* @param xacc [m/s/s] X acceleration
|
||||
* @param yacc [m/s/s] Y acceleration
|
||||
* @param zacc [m/s/s] Z acceleration
|
||||
* @param xgyro [rad/s] Angular speed around X axis
|
||||
* @param ygyro [rad/s] Angular speed around Y axis
|
||||
* @param zgyro [rad/s] Angular speed around Z axis
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_avss_drone_imu_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint32_t time_boot_ms, float q1, float q2, float q3, float q4, float xacc, float yacc, float zacc, float xgyro, float ygyro, float zgyro)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_AVSS_DRONE_IMU_LEN];
|
||||
_mav_put_uint32_t(buf, 0, time_boot_ms);
|
||||
_mav_put_float(buf, 4, q1);
|
||||
_mav_put_float(buf, 8, q2);
|
||||
_mav_put_float(buf, 12, q3);
|
||||
_mav_put_float(buf, 16, q4);
|
||||
_mav_put_float(buf, 20, xacc);
|
||||
_mav_put_float(buf, 24, yacc);
|
||||
_mav_put_float(buf, 28, zacc);
|
||||
_mav_put_float(buf, 32, xgyro);
|
||||
_mav_put_float(buf, 36, ygyro);
|
||||
_mav_put_float(buf, 40, zgyro);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AVSS_DRONE_IMU_LEN);
|
||||
#else
|
||||
mavlink_avss_drone_imu_t packet;
|
||||
packet.time_boot_ms = time_boot_ms;
|
||||
packet.q1 = q1;
|
||||
packet.q2 = q2;
|
||||
packet.q3 = q3;
|
||||
packet.q4 = q4;
|
||||
packet.xacc = xacc;
|
||||
packet.yacc = yacc;
|
||||
packet.zacc = zacc;
|
||||
packet.xgyro = xgyro;
|
||||
packet.ygyro = ygyro;
|
||||
packet.zgyro = zgyro;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AVSS_DRONE_IMU_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_AVSS_DRONE_IMU;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AVSS_DRONE_IMU_MIN_LEN, MAVLINK_MSG_ID_AVSS_DRONE_IMU_LEN, MAVLINK_MSG_ID_AVSS_DRONE_IMU_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AVSS_DRONE_IMU_MIN_LEN, MAVLINK_MSG_ID_AVSS_DRONE_IMU_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a avss_drone_imu message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -209,6 +272,20 @@ static inline uint16_t mavlink_msg_avss_drone_imu_encode_chan(uint8_t system_id,
|
||||
return mavlink_msg_avss_drone_imu_pack_chan(system_id, component_id, chan, msg, avss_drone_imu->time_boot_ms, avss_drone_imu->q1, avss_drone_imu->q2, avss_drone_imu->q3, avss_drone_imu->q4, avss_drone_imu->xacc, avss_drone_imu->yacc, avss_drone_imu->zacc, avss_drone_imu->xgyro, avss_drone_imu->ygyro, avss_drone_imu->zgyro);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a avss_drone_imu struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param avss_drone_imu C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_avss_drone_imu_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_avss_drone_imu_t* avss_drone_imu)
|
||||
{
|
||||
return mavlink_msg_avss_drone_imu_pack_status(system_id, component_id, _status, msg, avss_drone_imu->time_boot_ms, avss_drone_imu->q1, avss_drone_imu->q2, avss_drone_imu->q3, avss_drone_imu->q4, avss_drone_imu->xacc, avss_drone_imu->yacc, avss_drone_imu->zacc, avss_drone_imu->xgyro, avss_drone_imu->ygyro, avss_drone_imu->zgyro);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a avss_drone_imu message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -75,6 +75,45 @@ static inline uint16_t mavlink_msg_avss_drone_operation_mode_pack(uint8_t system
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AVSS_DRONE_OPERATION_MODE_MIN_LEN, MAVLINK_MSG_ID_AVSS_DRONE_OPERATION_MODE_LEN, MAVLINK_MSG_ID_AVSS_DRONE_OPERATION_MODE_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a avss_drone_operation_mode message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param time_boot_ms [ms] Timestamp (time since FC boot).
|
||||
* @param M300_operation_mode DJI M300 operation mode
|
||||
* @param horsefly_operation_mode horsefly operation mode
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_avss_drone_operation_mode_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint32_t time_boot_ms, uint8_t M300_operation_mode, uint8_t horsefly_operation_mode)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_AVSS_DRONE_OPERATION_MODE_LEN];
|
||||
_mav_put_uint32_t(buf, 0, time_boot_ms);
|
||||
_mav_put_uint8_t(buf, 4, M300_operation_mode);
|
||||
_mav_put_uint8_t(buf, 5, horsefly_operation_mode);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AVSS_DRONE_OPERATION_MODE_LEN);
|
||||
#else
|
||||
mavlink_avss_drone_operation_mode_t packet;
|
||||
packet.time_boot_ms = time_boot_ms;
|
||||
packet.M300_operation_mode = M300_operation_mode;
|
||||
packet.horsefly_operation_mode = horsefly_operation_mode;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AVSS_DRONE_OPERATION_MODE_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_AVSS_DRONE_OPERATION_MODE;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AVSS_DRONE_OPERATION_MODE_MIN_LEN, MAVLINK_MSG_ID_AVSS_DRONE_OPERATION_MODE_LEN, MAVLINK_MSG_ID_AVSS_DRONE_OPERATION_MODE_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AVSS_DRONE_OPERATION_MODE_MIN_LEN, MAVLINK_MSG_ID_AVSS_DRONE_OPERATION_MODE_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a avss_drone_operation_mode message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -137,6 +176,20 @@ static inline uint16_t mavlink_msg_avss_drone_operation_mode_encode_chan(uint8_t
|
||||
return mavlink_msg_avss_drone_operation_mode_pack_chan(system_id, component_id, chan, msg, avss_drone_operation_mode->time_boot_ms, avss_drone_operation_mode->M300_operation_mode, avss_drone_operation_mode->horsefly_operation_mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a avss_drone_operation_mode struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param avss_drone_operation_mode C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_avss_drone_operation_mode_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_avss_drone_operation_mode_t* avss_drone_operation_mode)
|
||||
{
|
||||
return mavlink_msg_avss_drone_operation_mode_pack_status(system_id, component_id, _status, msg, avss_drone_operation_mode->time_boot_ms, avss_drone_operation_mode->M300_operation_mode, avss_drone_operation_mode->horsefly_operation_mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a avss_drone_operation_mode message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -93,6 +93,54 @@ static inline uint16_t mavlink_msg_avss_drone_position_pack(uint8_t system_id, u
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AVSS_DRONE_POSITION_MIN_LEN, MAVLINK_MSG_ID_AVSS_DRONE_POSITION_LEN, MAVLINK_MSG_ID_AVSS_DRONE_POSITION_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a avss_drone_position message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param time_boot_ms [ms] Timestamp (time since FC boot).
|
||||
* @param lat [degE7] Latitude, expressed
|
||||
* @param lon [degE7] Longitude, expressed
|
||||
* @param alt [mm] Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL.
|
||||
* @param ground_alt [m] Altitude above ground, This altitude is measured by a ultrasound, Laser rangefinder or millimeter-wave radar
|
||||
* @param barometer_alt [m] This altitude is measured by a barometer
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_avss_drone_position_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint32_t time_boot_ms, int32_t lat, int32_t lon, int32_t alt, float ground_alt, float barometer_alt)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_AVSS_DRONE_POSITION_LEN];
|
||||
_mav_put_uint32_t(buf, 0, time_boot_ms);
|
||||
_mav_put_int32_t(buf, 4, lat);
|
||||
_mav_put_int32_t(buf, 8, lon);
|
||||
_mav_put_int32_t(buf, 12, alt);
|
||||
_mav_put_float(buf, 16, ground_alt);
|
||||
_mav_put_float(buf, 20, barometer_alt);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AVSS_DRONE_POSITION_LEN);
|
||||
#else
|
||||
mavlink_avss_drone_position_t packet;
|
||||
packet.time_boot_ms = time_boot_ms;
|
||||
packet.lat = lat;
|
||||
packet.lon = lon;
|
||||
packet.alt = alt;
|
||||
packet.ground_alt = ground_alt;
|
||||
packet.barometer_alt = barometer_alt;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AVSS_DRONE_POSITION_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_AVSS_DRONE_POSITION;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AVSS_DRONE_POSITION_MIN_LEN, MAVLINK_MSG_ID_AVSS_DRONE_POSITION_LEN, MAVLINK_MSG_ID_AVSS_DRONE_POSITION_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AVSS_DRONE_POSITION_MIN_LEN, MAVLINK_MSG_ID_AVSS_DRONE_POSITION_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a avss_drone_position message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -164,6 +212,20 @@ static inline uint16_t mavlink_msg_avss_drone_position_encode_chan(uint8_t syste
|
||||
return mavlink_msg_avss_drone_position_pack_chan(system_id, component_id, chan, msg, avss_drone_position->time_boot_ms, avss_drone_position->lat, avss_drone_position->lon, avss_drone_position->alt, avss_drone_position->ground_alt, avss_drone_position->barometer_alt);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a avss_drone_position struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param avss_drone_position C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_avss_drone_position_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_avss_drone_position_t* avss_drone_position)
|
||||
{
|
||||
return mavlink_msg_avss_drone_position_pack_status(system_id, component_id, _status, msg, avss_drone_position->time_boot_ms, avss_drone_position->lat, avss_drone_position->lon, avss_drone_position->alt, avss_drone_position->ground_alt, avss_drone_position->barometer_alt);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a avss_drone_position message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -87,6 +87,51 @@ static inline uint16_t mavlink_msg_avss_prs_sys_status_pack(uint8_t system_id, u
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AVSS_PRS_SYS_STATUS_MIN_LEN, MAVLINK_MSG_ID_AVSS_PRS_SYS_STATUS_LEN, MAVLINK_MSG_ID_AVSS_PRS_SYS_STATUS_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a avss_prs_sys_status message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param time_boot_ms [ms] Timestamp (time since PRS boot).
|
||||
* @param error_status PRS error statuses
|
||||
* @param battery_status Estimated battery run-time without a remote connection and PRS battery voltage
|
||||
* @param arm_status PRS arm statuses
|
||||
* @param charge_status PRS battery charge statuses
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_avss_prs_sys_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint32_t time_boot_ms, uint32_t error_status, uint32_t battery_status, uint8_t arm_status, uint8_t charge_status)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_AVSS_PRS_SYS_STATUS_LEN];
|
||||
_mav_put_uint32_t(buf, 0, time_boot_ms);
|
||||
_mav_put_uint32_t(buf, 4, error_status);
|
||||
_mav_put_uint32_t(buf, 8, battery_status);
|
||||
_mav_put_uint8_t(buf, 12, arm_status);
|
||||
_mav_put_uint8_t(buf, 13, charge_status);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AVSS_PRS_SYS_STATUS_LEN);
|
||||
#else
|
||||
mavlink_avss_prs_sys_status_t packet;
|
||||
packet.time_boot_ms = time_boot_ms;
|
||||
packet.error_status = error_status;
|
||||
packet.battery_status = battery_status;
|
||||
packet.arm_status = arm_status;
|
||||
packet.charge_status = charge_status;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AVSS_PRS_SYS_STATUS_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_AVSS_PRS_SYS_STATUS;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AVSS_PRS_SYS_STATUS_MIN_LEN, MAVLINK_MSG_ID_AVSS_PRS_SYS_STATUS_LEN, MAVLINK_MSG_ID_AVSS_PRS_SYS_STATUS_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AVSS_PRS_SYS_STATUS_MIN_LEN, MAVLINK_MSG_ID_AVSS_PRS_SYS_STATUS_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a avss_prs_sys_status message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -155,6 +200,20 @@ static inline uint16_t mavlink_msg_avss_prs_sys_status_encode_chan(uint8_t syste
|
||||
return mavlink_msg_avss_prs_sys_status_pack_chan(system_id, component_id, chan, msg, avss_prs_sys_status->time_boot_ms, avss_prs_sys_status->error_status, avss_prs_sys_status->battery_status, avss_prs_sys_status->arm_status, avss_prs_sys_status->charge_status);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a avss_prs_sys_status struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param avss_prs_sys_status C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_avss_prs_sys_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_avss_prs_sys_status_t* avss_prs_sys_status)
|
||||
{
|
||||
return mavlink_msg_avss_prs_sys_status_pack_status(system_id, component_id, _status, msg, avss_prs_sys_status->time_boot_ms, avss_prs_sys_status->error_status, avss_prs_sys_status->battery_status, avss_prs_sys_status->arm_status, avss_prs_sys_status->charge_status);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a avss_prs_sys_status message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Mon Mar 04 2024"
|
||||
#define MAVLINK_BUILD_DATE "Wed Mar 06 2024"
|
||||
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
|
||||
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#error Wrong include order: MAVLINK_ALL.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
|
||||
#endif
|
||||
|
||||
#define MAVLINK_ALL_XML_HASH -8997877720262206605
|
||||
#define MAVLINK_ALL_XML_HASH -5517383316853678921
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#ifndef MAVLINK_H
|
||||
#define MAVLINK_H
|
||||
|
||||
#define MAVLINK_PRIMARY_XML_HASH -8997877720262206605
|
||||
#define MAVLINK_PRIMARY_XML_HASH -5517383316853678921
|
||||
|
||||
#ifndef MAVLINK_STX
|
||||
#define MAVLINK_STX 253
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Mon Mar 04 2024"
|
||||
#define MAVLINK_BUILD_DATE "Wed Mar 06 2024"
|
||||
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
|
||||
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#error Wrong include order: MAVLINK_ARDUPILOTMEGA.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
|
||||
#endif
|
||||
|
||||
#define MAVLINK_ARDUPILOTMEGA_XML_HASH 6469208098198518850
|
||||
#define MAVLINK_ARDUPILOTMEGA_XML_HASH 3080658263437269706
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#ifndef MAVLINK_H
|
||||
#define MAVLINK_H
|
||||
|
||||
#define MAVLINK_PRIMARY_XML_HASH 6469208098198518850
|
||||
#define MAVLINK_PRIMARY_XML_HASH 3080658263437269706
|
||||
|
||||
#ifndef MAVLINK_STX
|
||||
#define MAVLINK_STX 253
|
||||
|
||||
@@ -135,6 +135,75 @@ static inline uint16_t mavlink_msg_adap_tuning_pack(uint8_t system_id, uint8_t c
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ADAP_TUNING_MIN_LEN, MAVLINK_MSG_ID_ADAP_TUNING_LEN, MAVLINK_MSG_ID_ADAP_TUNING_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a adap_tuning message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param axis Axis.
|
||||
* @param desired [deg/s] Desired rate.
|
||||
* @param achieved [deg/s] Achieved rate.
|
||||
* @param error Error between model and vehicle.
|
||||
* @param theta Theta estimated state predictor.
|
||||
* @param omega Omega estimated state predictor.
|
||||
* @param sigma Sigma estimated state predictor.
|
||||
* @param theta_dot Theta derivative.
|
||||
* @param omega_dot Omega derivative.
|
||||
* @param sigma_dot Sigma derivative.
|
||||
* @param f Projection operator value.
|
||||
* @param f_dot Projection operator derivative.
|
||||
* @param u u adaptive controlled output command.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_adap_tuning_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t axis, float desired, float achieved, float error, float theta, float omega, float sigma, float theta_dot, float omega_dot, float sigma_dot, float f, float f_dot, float u)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_ADAP_TUNING_LEN];
|
||||
_mav_put_float(buf, 0, desired);
|
||||
_mav_put_float(buf, 4, achieved);
|
||||
_mav_put_float(buf, 8, error);
|
||||
_mav_put_float(buf, 12, theta);
|
||||
_mav_put_float(buf, 16, omega);
|
||||
_mav_put_float(buf, 20, sigma);
|
||||
_mav_put_float(buf, 24, theta_dot);
|
||||
_mav_put_float(buf, 28, omega_dot);
|
||||
_mav_put_float(buf, 32, sigma_dot);
|
||||
_mav_put_float(buf, 36, f);
|
||||
_mav_put_float(buf, 40, f_dot);
|
||||
_mav_put_float(buf, 44, u);
|
||||
_mav_put_uint8_t(buf, 48, axis);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ADAP_TUNING_LEN);
|
||||
#else
|
||||
mavlink_adap_tuning_t packet;
|
||||
packet.desired = desired;
|
||||
packet.achieved = achieved;
|
||||
packet.error = error;
|
||||
packet.theta = theta;
|
||||
packet.omega = omega;
|
||||
packet.sigma = sigma;
|
||||
packet.theta_dot = theta_dot;
|
||||
packet.omega_dot = omega_dot;
|
||||
packet.sigma_dot = sigma_dot;
|
||||
packet.f = f;
|
||||
packet.f_dot = f_dot;
|
||||
packet.u = u;
|
||||
packet.axis = axis;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ADAP_TUNING_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_ADAP_TUNING;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ADAP_TUNING_MIN_LEN, MAVLINK_MSG_ID_ADAP_TUNING_LEN, MAVLINK_MSG_ID_ADAP_TUNING_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ADAP_TUNING_MIN_LEN, MAVLINK_MSG_ID_ADAP_TUNING_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a adap_tuning message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -227,6 +296,20 @@ static inline uint16_t mavlink_msg_adap_tuning_encode_chan(uint8_t system_id, ui
|
||||
return mavlink_msg_adap_tuning_pack_chan(system_id, component_id, chan, msg, adap_tuning->axis, adap_tuning->desired, adap_tuning->achieved, adap_tuning->error, adap_tuning->theta, adap_tuning->omega, adap_tuning->sigma, adap_tuning->theta_dot, adap_tuning->omega_dot, adap_tuning->sigma_dot, adap_tuning->f, adap_tuning->f_dot, adap_tuning->u);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a adap_tuning struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param adap_tuning C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_adap_tuning_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_adap_tuning_t* adap_tuning)
|
||||
{
|
||||
return mavlink_msg_adap_tuning_pack_status(system_id, component_id, _status, msg, adap_tuning->axis, adap_tuning->desired, adap_tuning->achieved, adap_tuning->error, adap_tuning->theta, adap_tuning->omega, adap_tuning->sigma, adap_tuning->theta_dot, adap_tuning->omega_dot, adap_tuning->sigma_dot, adap_tuning->f, adap_tuning->f_dot, adap_tuning->u);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a adap_tuning message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -99,6 +99,57 @@ static inline uint16_t mavlink_msg_ahrs_pack(uint8_t system_id, uint8_t componen
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AHRS_MIN_LEN, MAVLINK_MSG_ID_AHRS_LEN, MAVLINK_MSG_ID_AHRS_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a ahrs message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param omegaIx [rad/s] X gyro drift estimate.
|
||||
* @param omegaIy [rad/s] Y gyro drift estimate.
|
||||
* @param omegaIz [rad/s] Z gyro drift estimate.
|
||||
* @param accel_weight Average accel_weight.
|
||||
* @param renorm_val Average renormalisation value.
|
||||
* @param error_rp Average error_roll_pitch value.
|
||||
* @param error_yaw Average error_yaw value.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_ahrs_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
float omegaIx, float omegaIy, float omegaIz, float accel_weight, float renorm_val, float error_rp, float error_yaw)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_AHRS_LEN];
|
||||
_mav_put_float(buf, 0, omegaIx);
|
||||
_mav_put_float(buf, 4, omegaIy);
|
||||
_mav_put_float(buf, 8, omegaIz);
|
||||
_mav_put_float(buf, 12, accel_weight);
|
||||
_mav_put_float(buf, 16, renorm_val);
|
||||
_mav_put_float(buf, 20, error_rp);
|
||||
_mav_put_float(buf, 24, error_yaw);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AHRS_LEN);
|
||||
#else
|
||||
mavlink_ahrs_t packet;
|
||||
packet.omegaIx = omegaIx;
|
||||
packet.omegaIy = omegaIy;
|
||||
packet.omegaIz = omegaIz;
|
||||
packet.accel_weight = accel_weight;
|
||||
packet.renorm_val = renorm_val;
|
||||
packet.error_rp = error_rp;
|
||||
packet.error_yaw = error_yaw;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AHRS_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_AHRS;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AHRS_MIN_LEN, MAVLINK_MSG_ID_AHRS_LEN, MAVLINK_MSG_ID_AHRS_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AHRS_MIN_LEN, MAVLINK_MSG_ID_AHRS_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a ahrs message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -173,6 +224,20 @@ static inline uint16_t mavlink_msg_ahrs_encode_chan(uint8_t system_id, uint8_t c
|
||||
return mavlink_msg_ahrs_pack_chan(system_id, component_id, chan, msg, ahrs->omegaIx, ahrs->omegaIy, ahrs->omegaIz, ahrs->accel_weight, ahrs->renorm_val, ahrs->error_rp, ahrs->error_yaw);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a ahrs struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param ahrs C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_ahrs_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_ahrs_t* ahrs)
|
||||
{
|
||||
return mavlink_msg_ahrs_pack_status(system_id, component_id, _status, msg, ahrs->omegaIx, ahrs->omegaIy, ahrs->omegaIz, ahrs->accel_weight, ahrs->renorm_val, ahrs->error_rp, ahrs->error_yaw);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a ahrs message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -93,6 +93,54 @@ static inline uint16_t mavlink_msg_ahrs2_pack(uint8_t system_id, uint8_t compone
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AHRS2_MIN_LEN, MAVLINK_MSG_ID_AHRS2_LEN, MAVLINK_MSG_ID_AHRS2_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a ahrs2 message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param roll [rad] Roll angle.
|
||||
* @param pitch [rad] Pitch angle.
|
||||
* @param yaw [rad] Yaw angle.
|
||||
* @param altitude [m] Altitude (MSL).
|
||||
* @param lat [degE7] Latitude.
|
||||
* @param lng [degE7] Longitude.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_ahrs2_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
float roll, float pitch, float yaw, float altitude, int32_t lat, int32_t lng)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_AHRS2_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);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AHRS2_LEN);
|
||||
#else
|
||||
mavlink_ahrs2_t packet;
|
||||
packet.roll = roll;
|
||||
packet.pitch = pitch;
|
||||
packet.yaw = yaw;
|
||||
packet.altitude = altitude;
|
||||
packet.lat = lat;
|
||||
packet.lng = lng;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AHRS2_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_AHRS2;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AHRS2_MIN_LEN, MAVLINK_MSG_ID_AHRS2_LEN, MAVLINK_MSG_ID_AHRS2_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AHRS2_MIN_LEN, MAVLINK_MSG_ID_AHRS2_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a ahrs2 message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -164,6 +212,20 @@ static inline uint16_t mavlink_msg_ahrs2_encode_chan(uint8_t system_id, uint8_t
|
||||
return mavlink_msg_ahrs2_pack_chan(system_id, component_id, chan, msg, ahrs2->roll, ahrs2->pitch, ahrs2->yaw, ahrs2->altitude, ahrs2->lat, ahrs2->lng);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a ahrs2 struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param ahrs2 C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_ahrs2_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_ahrs2_t* ahrs2)
|
||||
{
|
||||
return mavlink_msg_ahrs2_pack_status(system_id, component_id, _status, msg, ahrs2->roll, ahrs2->pitch, ahrs2->yaw, ahrs2->altitude, ahrs2->lat, ahrs2->lng);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a ahrs2 message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -117,6 +117,66 @@ static inline uint16_t mavlink_msg_ahrs3_pack(uint8_t system_id, uint8_t compone
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AHRS3_MIN_LEN, MAVLINK_MSG_ID_AHRS3_LEN, MAVLINK_MSG_ID_AHRS3_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @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 status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param roll [rad] Roll angle.
|
||||
* @param pitch [rad] Pitch angle.
|
||||
* @param yaw [rad] Yaw angle.
|
||||
* @param altitude [m] Altitude (MSL).
|
||||
* @param lat [degE7] Latitude.
|
||||
* @param lng [degE7] Longitude.
|
||||
* @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_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, 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_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AHRS3_MIN_LEN, MAVLINK_MSG_ID_AHRS3_LEN, MAVLINK_MSG_ID_AHRS3_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AHRS3_MIN_LEN, MAVLINK_MSG_ID_AHRS3_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a ahrs3 message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -200,6 +260,20 @@ static inline uint16_t mavlink_msg_ahrs3_encode_chan(uint8_t system_id, uint8_t
|
||||
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 Encode a ahrs3 struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @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_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_ahrs3_t* ahrs3)
|
||||
{
|
||||
return mavlink_msg_ahrs3_pack_status(system_id, component_id, _status, 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
|
||||
|
||||
@@ -129,6 +129,72 @@ static inline uint16_t mavlink_msg_airspeed_autocal_pack(uint8_t system_id, uint
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_MIN_LEN, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_LEN, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a airspeed_autocal message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param vx [m/s] GPS velocity north.
|
||||
* @param vy [m/s] GPS velocity east.
|
||||
* @param vz [m/s] GPS velocity down.
|
||||
* @param diff_pressure [Pa] Differential pressure.
|
||||
* @param EAS2TAS Estimated to true airspeed ratio.
|
||||
* @param ratio Airspeed ratio.
|
||||
* @param state_x EKF state x.
|
||||
* @param state_y EKF state y.
|
||||
* @param state_z EKF state z.
|
||||
* @param Pax EKF Pax.
|
||||
* @param Pby EKF Pby.
|
||||
* @param Pcz EKF Pcz.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_airspeed_autocal_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
float vx, float vy, float vz, float diff_pressure, float EAS2TAS, float ratio, float state_x, float state_y, float state_z, float Pax, float Pby, float Pcz)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_LEN];
|
||||
_mav_put_float(buf, 0, vx);
|
||||
_mav_put_float(buf, 4, vy);
|
||||
_mav_put_float(buf, 8, vz);
|
||||
_mav_put_float(buf, 12, diff_pressure);
|
||||
_mav_put_float(buf, 16, EAS2TAS);
|
||||
_mav_put_float(buf, 20, ratio);
|
||||
_mav_put_float(buf, 24, state_x);
|
||||
_mav_put_float(buf, 28, state_y);
|
||||
_mav_put_float(buf, 32, state_z);
|
||||
_mav_put_float(buf, 36, Pax);
|
||||
_mav_put_float(buf, 40, Pby);
|
||||
_mav_put_float(buf, 44, Pcz);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_LEN);
|
||||
#else
|
||||
mavlink_airspeed_autocal_t packet;
|
||||
packet.vx = vx;
|
||||
packet.vy = vy;
|
||||
packet.vz = vz;
|
||||
packet.diff_pressure = diff_pressure;
|
||||
packet.EAS2TAS = EAS2TAS;
|
||||
packet.ratio = ratio;
|
||||
packet.state_x = state_x;
|
||||
packet.state_y = state_y;
|
||||
packet.state_z = state_z;
|
||||
packet.Pax = Pax;
|
||||
packet.Pby = Pby;
|
||||
packet.Pcz = Pcz;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_AIRSPEED_AUTOCAL;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_MIN_LEN, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_LEN, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_MIN_LEN, MAVLINK_MSG_ID_AIRSPEED_AUTOCAL_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a airspeed_autocal message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -218,6 +284,20 @@ static inline uint16_t mavlink_msg_airspeed_autocal_encode_chan(uint8_t system_i
|
||||
return mavlink_msg_airspeed_autocal_pack_chan(system_id, component_id, chan, msg, airspeed_autocal->vx, airspeed_autocal->vy, airspeed_autocal->vz, airspeed_autocal->diff_pressure, airspeed_autocal->EAS2TAS, airspeed_autocal->ratio, airspeed_autocal->state_x, airspeed_autocal->state_y, airspeed_autocal->state_z, airspeed_autocal->Pax, airspeed_autocal->Pby, airspeed_autocal->Pcz);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a airspeed_autocal struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param airspeed_autocal C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_airspeed_autocal_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_airspeed_autocal_t* airspeed_autocal)
|
||||
{
|
||||
return mavlink_msg_airspeed_autocal_pack_status(system_id, component_id, _status, msg, airspeed_autocal->vx, airspeed_autocal->vy, airspeed_autocal->vz, airspeed_autocal->diff_pressure, airspeed_autocal->EAS2TAS, airspeed_autocal->ratio, airspeed_autocal->state_x, airspeed_autocal->state_y, airspeed_autocal->state_z, airspeed_autocal->Pax, airspeed_autocal->Pby, airspeed_autocal->Pcz);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a airspeed_autocal message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -75,6 +75,45 @@ static inline uint16_t mavlink_msg_aoa_ssa_pack(uint8_t system_id, uint8_t compo
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AOA_SSA_MIN_LEN, MAVLINK_MSG_ID_AOA_SSA_LEN, MAVLINK_MSG_ID_AOA_SSA_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a aoa_ssa message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param time_usec [us] Timestamp (since boot or Unix epoch).
|
||||
* @param AOA [deg] Angle of Attack.
|
||||
* @param SSA [deg] Side Slip Angle.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_aoa_ssa_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint64_t time_usec, float AOA, float SSA)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_AOA_SSA_LEN];
|
||||
_mav_put_uint64_t(buf, 0, time_usec);
|
||||
_mav_put_float(buf, 8, AOA);
|
||||
_mav_put_float(buf, 12, SSA);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AOA_SSA_LEN);
|
||||
#else
|
||||
mavlink_aoa_ssa_t packet;
|
||||
packet.time_usec = time_usec;
|
||||
packet.AOA = AOA;
|
||||
packet.SSA = SSA;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AOA_SSA_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_AOA_SSA;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AOA_SSA_MIN_LEN, MAVLINK_MSG_ID_AOA_SSA_LEN, MAVLINK_MSG_ID_AOA_SSA_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AOA_SSA_MIN_LEN, MAVLINK_MSG_ID_AOA_SSA_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a aoa_ssa message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -137,6 +176,20 @@ static inline uint16_t mavlink_msg_aoa_ssa_encode_chan(uint8_t system_id, uint8_
|
||||
return mavlink_msg_aoa_ssa_pack_chan(system_id, component_id, chan, msg, aoa_ssa->time_usec, aoa_ssa->AOA, aoa_ssa->SSA);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a aoa_ssa struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param aoa_ssa C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_aoa_ssa_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_aoa_ssa_t* aoa_ssa)
|
||||
{
|
||||
return mavlink_msg_aoa_ssa_pack_status(system_id, component_id, _status, msg, aoa_ssa->time_usec, aoa_ssa->AOA, aoa_ssa->SSA);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a aoa_ssa message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -93,6 +93,54 @@ static inline uint16_t mavlink_msg_ap_adc_pack(uint8_t system_id, uint8_t compon
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AP_ADC_MIN_LEN, MAVLINK_MSG_ID_AP_ADC_LEN, MAVLINK_MSG_ID_AP_ADC_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a ap_adc message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param adc1 ADC output 1.
|
||||
* @param adc2 ADC output 2.
|
||||
* @param adc3 ADC output 3.
|
||||
* @param adc4 ADC output 4.
|
||||
* @param adc5 ADC output 5.
|
||||
* @param adc6 ADC output 6.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_ap_adc_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint16_t adc1, uint16_t adc2, uint16_t adc3, uint16_t adc4, uint16_t adc5, uint16_t adc6)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_AP_ADC_LEN];
|
||||
_mav_put_uint16_t(buf, 0, adc1);
|
||||
_mav_put_uint16_t(buf, 2, adc2);
|
||||
_mav_put_uint16_t(buf, 4, adc3);
|
||||
_mav_put_uint16_t(buf, 6, adc4);
|
||||
_mav_put_uint16_t(buf, 8, adc5);
|
||||
_mav_put_uint16_t(buf, 10, adc6);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AP_ADC_LEN);
|
||||
#else
|
||||
mavlink_ap_adc_t packet;
|
||||
packet.adc1 = adc1;
|
||||
packet.adc2 = adc2;
|
||||
packet.adc3 = adc3;
|
||||
packet.adc4 = adc4;
|
||||
packet.adc5 = adc5;
|
||||
packet.adc6 = adc6;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AP_ADC_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_AP_ADC;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AP_ADC_MIN_LEN, MAVLINK_MSG_ID_AP_ADC_LEN, MAVLINK_MSG_ID_AP_ADC_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AP_ADC_MIN_LEN, MAVLINK_MSG_ID_AP_ADC_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a ap_adc message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -164,6 +212,20 @@ static inline uint16_t mavlink_msg_ap_adc_encode_chan(uint8_t system_id, uint8_t
|
||||
return mavlink_msg_ap_adc_pack_chan(system_id, component_id, chan, msg, ap_adc->adc1, ap_adc->adc2, ap_adc->adc3, ap_adc->adc4, ap_adc->adc5, ap_adc->adc6);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a ap_adc struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param ap_adc C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_ap_adc_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_ap_adc_t* ap_adc)
|
||||
{
|
||||
return mavlink_msg_ap_adc_pack_status(system_id, component_id, _status, msg, ap_adc->adc1, ap_adc->adc2, ap_adc->adc3, ap_adc->adc4, ap_adc->adc5, ap_adc->adc6);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a ap_adc message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -69,6 +69,42 @@ static inline uint16_t mavlink_msg_autopilot_version_request_pack(uint8_t system
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_MIN_LEN, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_LEN, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @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 status MAVLink status structure
|
||||
* @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_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, 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_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_MIN_LEN, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_LEN, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AUTOPILOT_VERSION_REQUEST_MIN_LEN, 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
|
||||
@@ -128,6 +164,20 @@ static inline uint16_t mavlink_msg_autopilot_version_request_encode_chan(uint8_t
|
||||
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 Encode a autopilot_version_request struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @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_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_autopilot_version_request_t* autopilot_version_request)
|
||||
{
|
||||
return mavlink_msg_autopilot_version_request_pack_status(system_id, component_id, _status, 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
|
||||
|
||||
@@ -69,6 +69,42 @@ static inline uint16_t mavlink_msg_battery2_pack(uint8_t system_id, uint8_t comp
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_BATTERY2_MIN_LEN, MAVLINK_MSG_ID_BATTERY2_LEN, MAVLINK_MSG_ID_BATTERY2_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a battery2 message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param voltage [mV] Voltage.
|
||||
* @param current_battery [cA] Battery current, -1: autopilot does not measure the current.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_battery2_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint16_t voltage, int16_t current_battery)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_BATTERY2_LEN];
|
||||
_mav_put_uint16_t(buf, 0, voltage);
|
||||
_mav_put_int16_t(buf, 2, current_battery);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_BATTERY2_LEN);
|
||||
#else
|
||||
mavlink_battery2_t packet;
|
||||
packet.voltage = voltage;
|
||||
packet.current_battery = current_battery;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_BATTERY2_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_BATTERY2;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_BATTERY2_MIN_LEN, MAVLINK_MSG_ID_BATTERY2_LEN, MAVLINK_MSG_ID_BATTERY2_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_BATTERY2_MIN_LEN, MAVLINK_MSG_ID_BATTERY2_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a battery2 message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -128,6 +164,20 @@ static inline uint16_t mavlink_msg_battery2_encode_chan(uint8_t system_id, uint8
|
||||
return mavlink_msg_battery2_pack_chan(system_id, component_id, chan, msg, battery2->voltage, battery2->current_battery);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a battery2 struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param battery2 C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_battery2_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_battery2_t* battery2)
|
||||
{
|
||||
return mavlink_msg_battery2_pack_status(system_id, component_id, _status, msg, battery2->voltage, battery2->current_battery);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a battery2 message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -141,6 +141,78 @@ static inline uint16_t mavlink_msg_camera_feedback_pack(uint8_t system_id, uint8
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_CAMERA_FEEDBACK_MIN_LEN, MAVLINK_MSG_ID_CAMERA_FEEDBACK_LEN, MAVLINK_MSG_ID_CAMERA_FEEDBACK_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a camera_feedback message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param time_usec [us] Image timestamp (since UNIX epoch), as passed in by CAMERA_STATUS message (or autopilot if no CCB).
|
||||
* @param target_system System ID.
|
||||
* @param cam_idx Camera ID.
|
||||
* @param img_idx Image index.
|
||||
* @param lat [degE7] Latitude.
|
||||
* @param lng [degE7] Longitude.
|
||||
* @param alt_msl [m] Altitude (MSL).
|
||||
* @param alt_rel [m] Altitude (Relative to HOME location).
|
||||
* @param roll [deg] Camera Roll angle (earth frame, +-180).
|
||||
* @param pitch [deg] Camera Pitch angle (earth frame, +-180).
|
||||
* @param yaw [deg] Camera Yaw (earth frame, 0-360, true).
|
||||
* @param foc_len [mm] Focal Length.
|
||||
* @param flags Feedback flags.
|
||||
* @param completed_captures Completed image captures.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_camera_feedback_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint64_t time_usec, uint8_t target_system, uint8_t cam_idx, uint16_t img_idx, int32_t lat, int32_t lng, float alt_msl, float alt_rel, float roll, float pitch, float yaw, float foc_len, uint8_t flags, uint16_t completed_captures)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_CAMERA_FEEDBACK_LEN];
|
||||
_mav_put_uint64_t(buf, 0, time_usec);
|
||||
_mav_put_int32_t(buf, 8, lat);
|
||||
_mav_put_int32_t(buf, 12, lng);
|
||||
_mav_put_float(buf, 16, alt_msl);
|
||||
_mav_put_float(buf, 20, alt_rel);
|
||||
_mav_put_float(buf, 24, roll);
|
||||
_mav_put_float(buf, 28, pitch);
|
||||
_mav_put_float(buf, 32, yaw);
|
||||
_mav_put_float(buf, 36, foc_len);
|
||||
_mav_put_uint16_t(buf, 40, img_idx);
|
||||
_mav_put_uint8_t(buf, 42, target_system);
|
||||
_mav_put_uint8_t(buf, 43, cam_idx);
|
||||
_mav_put_uint8_t(buf, 44, flags);
|
||||
_mav_put_uint16_t(buf, 45, completed_captures);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CAMERA_FEEDBACK_LEN);
|
||||
#else
|
||||
mavlink_camera_feedback_t packet;
|
||||
packet.time_usec = time_usec;
|
||||
packet.lat = lat;
|
||||
packet.lng = lng;
|
||||
packet.alt_msl = alt_msl;
|
||||
packet.alt_rel = alt_rel;
|
||||
packet.roll = roll;
|
||||
packet.pitch = pitch;
|
||||
packet.yaw = yaw;
|
||||
packet.foc_len = foc_len;
|
||||
packet.img_idx = img_idx;
|
||||
packet.target_system = target_system;
|
||||
packet.cam_idx = cam_idx;
|
||||
packet.flags = flags;
|
||||
packet.completed_captures = completed_captures;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CAMERA_FEEDBACK_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_CAMERA_FEEDBACK;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_CAMERA_FEEDBACK_MIN_LEN, MAVLINK_MSG_ID_CAMERA_FEEDBACK_LEN, MAVLINK_MSG_ID_CAMERA_FEEDBACK_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_CAMERA_FEEDBACK_MIN_LEN, MAVLINK_MSG_ID_CAMERA_FEEDBACK_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a camera_feedback message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -236,6 +308,20 @@ static inline uint16_t mavlink_msg_camera_feedback_encode_chan(uint8_t system_id
|
||||
return mavlink_msg_camera_feedback_pack_chan(system_id, component_id, chan, msg, camera_feedback->time_usec, camera_feedback->target_system, camera_feedback->cam_idx, camera_feedback->img_idx, camera_feedback->lat, camera_feedback->lng, camera_feedback->alt_msl, camera_feedback->alt_rel, camera_feedback->roll, camera_feedback->pitch, camera_feedback->yaw, camera_feedback->foc_len, camera_feedback->flags, camera_feedback->completed_captures);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a camera_feedback struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param camera_feedback C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_camera_feedback_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_camera_feedback_t* camera_feedback)
|
||||
{
|
||||
return mavlink_msg_camera_feedback_pack_status(system_id, component_id, _status, msg, camera_feedback->time_usec, camera_feedback->target_system, camera_feedback->cam_idx, camera_feedback->img_idx, camera_feedback->lat, camera_feedback->lng, camera_feedback->alt_msl, camera_feedback->alt_rel, camera_feedback->roll, camera_feedback->pitch, camera_feedback->yaw, camera_feedback->foc_len, camera_feedback->flags, camera_feedback->completed_captures);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a camera_feedback message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -111,6 +111,63 @@ static inline uint16_t mavlink_msg_camera_status_pack(uint8_t system_id, uint8_t
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_CAMERA_STATUS_MIN_LEN, MAVLINK_MSG_ID_CAMERA_STATUS_LEN, MAVLINK_MSG_ID_CAMERA_STATUS_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a camera_status message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param time_usec [us] Image timestamp (since UNIX epoch, according to camera clock).
|
||||
* @param target_system System ID.
|
||||
* @param cam_idx Camera ID.
|
||||
* @param img_idx Image index.
|
||||
* @param event_id Event type.
|
||||
* @param p1 Parameter 1 (meaning depends on event_id, see CAMERA_STATUS_TYPES enum).
|
||||
* @param p2 Parameter 2 (meaning depends on event_id, see CAMERA_STATUS_TYPES enum).
|
||||
* @param p3 Parameter 3 (meaning depends on event_id, see CAMERA_STATUS_TYPES enum).
|
||||
* @param p4 Parameter 4 (meaning depends on event_id, see CAMERA_STATUS_TYPES enum).
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_camera_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint64_t time_usec, uint8_t target_system, uint8_t cam_idx, uint16_t img_idx, uint8_t event_id, float p1, float p2, float p3, float p4)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_CAMERA_STATUS_LEN];
|
||||
_mav_put_uint64_t(buf, 0, time_usec);
|
||||
_mav_put_float(buf, 8, p1);
|
||||
_mav_put_float(buf, 12, p2);
|
||||
_mav_put_float(buf, 16, p3);
|
||||
_mav_put_float(buf, 20, p4);
|
||||
_mav_put_uint16_t(buf, 24, img_idx);
|
||||
_mav_put_uint8_t(buf, 26, target_system);
|
||||
_mav_put_uint8_t(buf, 27, cam_idx);
|
||||
_mav_put_uint8_t(buf, 28, event_id);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CAMERA_STATUS_LEN);
|
||||
#else
|
||||
mavlink_camera_status_t packet;
|
||||
packet.time_usec = time_usec;
|
||||
packet.p1 = p1;
|
||||
packet.p2 = p2;
|
||||
packet.p3 = p3;
|
||||
packet.p4 = p4;
|
||||
packet.img_idx = img_idx;
|
||||
packet.target_system = target_system;
|
||||
packet.cam_idx = cam_idx;
|
||||
packet.event_id = event_id;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CAMERA_STATUS_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_CAMERA_STATUS;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_CAMERA_STATUS_MIN_LEN, MAVLINK_MSG_ID_CAMERA_STATUS_LEN, MAVLINK_MSG_ID_CAMERA_STATUS_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_CAMERA_STATUS_MIN_LEN, MAVLINK_MSG_ID_CAMERA_STATUS_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a camera_status message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -191,6 +248,20 @@ static inline uint16_t mavlink_msg_camera_status_encode_chan(uint8_t system_id,
|
||||
return mavlink_msg_camera_status_pack_chan(system_id, component_id, chan, msg, camera_status->time_usec, camera_status->target_system, camera_status->cam_idx, camera_status->img_idx, camera_status->event_id, camera_status->p1, camera_status->p2, camera_status->p3, camera_status->p4);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a camera_status struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param camera_status C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_camera_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_camera_status_t* camera_status)
|
||||
{
|
||||
return mavlink_msg_camera_status_pack_status(system_id, component_id, _status, msg, camera_status->time_usec, camera_status->target_system, camera_status->cam_idx, camera_status->img_idx, camera_status->event_id, camera_status->p1, camera_status->p2, camera_status->p3, camera_status->p4);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a camera_status message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -93,6 +93,54 @@ static inline uint16_t mavlink_msg_compassmot_status_pack(uint8_t system_id, uin
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_COMPASSMOT_STATUS_MIN_LEN, MAVLINK_MSG_ID_COMPASSMOT_STATUS_LEN, MAVLINK_MSG_ID_COMPASSMOT_STATUS_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a compassmot_status message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param throttle [d%] Throttle.
|
||||
* @param current [A] Current.
|
||||
* @param interference [%] Interference.
|
||||
* @param CompensationX Motor Compensation X.
|
||||
* @param CompensationY Motor Compensation Y.
|
||||
* @param CompensationZ Motor Compensation Z.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_compassmot_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint16_t throttle, float current, uint16_t interference, float CompensationX, float CompensationY, float CompensationZ)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_COMPASSMOT_STATUS_LEN];
|
||||
_mav_put_float(buf, 0, current);
|
||||
_mav_put_float(buf, 4, CompensationX);
|
||||
_mav_put_float(buf, 8, CompensationY);
|
||||
_mav_put_float(buf, 12, CompensationZ);
|
||||
_mav_put_uint16_t(buf, 16, throttle);
|
||||
_mav_put_uint16_t(buf, 18, interference);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_COMPASSMOT_STATUS_LEN);
|
||||
#else
|
||||
mavlink_compassmot_status_t packet;
|
||||
packet.current = current;
|
||||
packet.CompensationX = CompensationX;
|
||||
packet.CompensationY = CompensationY;
|
||||
packet.CompensationZ = CompensationZ;
|
||||
packet.throttle = throttle;
|
||||
packet.interference = interference;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMPASSMOT_STATUS_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_COMPASSMOT_STATUS;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_COMPASSMOT_STATUS_MIN_LEN, MAVLINK_MSG_ID_COMPASSMOT_STATUS_LEN, MAVLINK_MSG_ID_COMPASSMOT_STATUS_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_COMPASSMOT_STATUS_MIN_LEN, MAVLINK_MSG_ID_COMPASSMOT_STATUS_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a compassmot_status message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -164,6 +212,20 @@ static inline uint16_t mavlink_msg_compassmot_status_encode_chan(uint8_t system_
|
||||
return mavlink_msg_compassmot_status_pack_chan(system_id, component_id, chan, msg, compassmot_status->throttle, compassmot_status->current, compassmot_status->interference, compassmot_status->CompensationX, compassmot_status->CompensationY, compassmot_status->CompensationZ);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a compassmot_status struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param compassmot_status C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_compassmot_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_compassmot_status_t* compassmot_status)
|
||||
{
|
||||
return mavlink_msg_compassmot_status_pack_status(system_id, component_id, _status, msg, compassmot_status->throttle, compassmot_status->current, compassmot_status->interference, compassmot_status->CompensationX, compassmot_status->CompensationY, compassmot_status->CompensationZ);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a compassmot_status message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -73,6 +73,43 @@ static inline uint16_t mavlink_msg_data16_pack(uint8_t system_id, uint8_t compon
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DATA16_MIN_LEN, MAVLINK_MSG_ID_DATA16_LEN, MAVLINK_MSG_ID_DATA16_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a data16 message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param type Data type.
|
||||
* @param len [bytes] Data length.
|
||||
* @param data Raw data.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_data16_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t type, uint8_t len, const uint8_t *data)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_DATA16_LEN];
|
||||
_mav_put_uint8_t(buf, 0, type);
|
||||
_mav_put_uint8_t(buf, 1, len);
|
||||
_mav_put_uint8_t_array(buf, 2, data, 16);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DATA16_LEN);
|
||||
#else
|
||||
mavlink_data16_t packet;
|
||||
packet.type = type;
|
||||
packet.len = len;
|
||||
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*16);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DATA16_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_DATA16;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_DATA16_MIN_LEN, MAVLINK_MSG_ID_DATA16_LEN, MAVLINK_MSG_ID_DATA16_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_DATA16_MIN_LEN, MAVLINK_MSG_ID_DATA16_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a data16 message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -133,6 +170,20 @@ static inline uint16_t mavlink_msg_data16_encode_chan(uint8_t system_id, uint8_t
|
||||
return mavlink_msg_data16_pack_chan(system_id, component_id, chan, msg, data16->type, data16->len, data16->data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a data16 struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param data16 C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_data16_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_data16_t* data16)
|
||||
{
|
||||
return mavlink_msg_data16_pack_status(system_id, component_id, _status, msg, data16->type, data16->len, data16->data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a data16 message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -73,6 +73,43 @@ static inline uint16_t mavlink_msg_data32_pack(uint8_t system_id, uint8_t compon
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DATA32_MIN_LEN, MAVLINK_MSG_ID_DATA32_LEN, MAVLINK_MSG_ID_DATA32_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a data32 message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param type Data type.
|
||||
* @param len [bytes] Data length.
|
||||
* @param data Raw data.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_data32_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t type, uint8_t len, const uint8_t *data)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_DATA32_LEN];
|
||||
_mav_put_uint8_t(buf, 0, type);
|
||||
_mav_put_uint8_t(buf, 1, len);
|
||||
_mav_put_uint8_t_array(buf, 2, data, 32);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DATA32_LEN);
|
||||
#else
|
||||
mavlink_data32_t packet;
|
||||
packet.type = type;
|
||||
packet.len = len;
|
||||
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*32);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DATA32_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_DATA32;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_DATA32_MIN_LEN, MAVLINK_MSG_ID_DATA32_LEN, MAVLINK_MSG_ID_DATA32_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_DATA32_MIN_LEN, MAVLINK_MSG_ID_DATA32_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a data32 message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -133,6 +170,20 @@ static inline uint16_t mavlink_msg_data32_encode_chan(uint8_t system_id, uint8_t
|
||||
return mavlink_msg_data32_pack_chan(system_id, component_id, chan, msg, data32->type, data32->len, data32->data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a data32 struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param data32 C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_data32_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_data32_t* data32)
|
||||
{
|
||||
return mavlink_msg_data32_pack_status(system_id, component_id, _status, msg, data32->type, data32->len, data32->data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a data32 message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -73,6 +73,43 @@ static inline uint16_t mavlink_msg_data64_pack(uint8_t system_id, uint8_t compon
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DATA64_MIN_LEN, MAVLINK_MSG_ID_DATA64_LEN, MAVLINK_MSG_ID_DATA64_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a data64 message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param type Data type.
|
||||
* @param len [bytes] Data length.
|
||||
* @param data Raw data.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_data64_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t type, uint8_t len, const uint8_t *data)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_DATA64_LEN];
|
||||
_mav_put_uint8_t(buf, 0, type);
|
||||
_mav_put_uint8_t(buf, 1, len);
|
||||
_mav_put_uint8_t_array(buf, 2, data, 64);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DATA64_LEN);
|
||||
#else
|
||||
mavlink_data64_t packet;
|
||||
packet.type = type;
|
||||
packet.len = len;
|
||||
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*64);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DATA64_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_DATA64;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_DATA64_MIN_LEN, MAVLINK_MSG_ID_DATA64_LEN, MAVLINK_MSG_ID_DATA64_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_DATA64_MIN_LEN, MAVLINK_MSG_ID_DATA64_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a data64 message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -133,6 +170,20 @@ static inline uint16_t mavlink_msg_data64_encode_chan(uint8_t system_id, uint8_t
|
||||
return mavlink_msg_data64_pack_chan(system_id, component_id, chan, msg, data64->type, data64->len, data64->data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a data64 struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param data64 C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_data64_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_data64_t* data64)
|
||||
{
|
||||
return mavlink_msg_data64_pack_status(system_id, component_id, _status, msg, data64->type, data64->len, data64->data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a data64 message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -73,6 +73,43 @@ static inline uint16_t mavlink_msg_data96_pack(uint8_t system_id, uint8_t compon
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DATA96_MIN_LEN, MAVLINK_MSG_ID_DATA96_LEN, MAVLINK_MSG_ID_DATA96_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a data96 message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param type Data type.
|
||||
* @param len [bytes] Data length.
|
||||
* @param data Raw data.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_data96_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t type, uint8_t len, const uint8_t *data)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_DATA96_LEN];
|
||||
_mav_put_uint8_t(buf, 0, type);
|
||||
_mav_put_uint8_t(buf, 1, len);
|
||||
_mav_put_uint8_t_array(buf, 2, data, 96);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DATA96_LEN);
|
||||
#else
|
||||
mavlink_data96_t packet;
|
||||
packet.type = type;
|
||||
packet.len = len;
|
||||
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*96);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DATA96_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_DATA96;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_DATA96_MIN_LEN, MAVLINK_MSG_ID_DATA96_LEN, MAVLINK_MSG_ID_DATA96_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_DATA96_MIN_LEN, MAVLINK_MSG_ID_DATA96_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a data96 message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -133,6 +170,20 @@ static inline uint16_t mavlink_msg_data96_encode_chan(uint8_t system_id, uint8_t
|
||||
return mavlink_msg_data96_pack_chan(system_id, component_id, chan, msg, data96->type, data96->len, data96->data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a data96 struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param data96 C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_data96_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_data96_t* data96)
|
||||
{
|
||||
return mavlink_msg_data96_pack_status(system_id, component_id, _status, msg, data96->type, data96->len, data96->data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a data96 message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -117,6 +117,66 @@ static inline uint16_t mavlink_msg_deepstall_pack(uint8_t system_id, uint8_t com
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DEEPSTALL_MIN_LEN, MAVLINK_MSG_ID_DEEPSTALL_LEN, MAVLINK_MSG_ID_DEEPSTALL_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a deepstall message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param landing_lat [degE7] Landing latitude.
|
||||
* @param landing_lon [degE7] Landing longitude.
|
||||
* @param path_lat [degE7] Final heading start point, latitude.
|
||||
* @param path_lon [degE7] Final heading start point, longitude.
|
||||
* @param arc_entry_lat [degE7] Arc entry point, latitude.
|
||||
* @param arc_entry_lon [degE7] Arc entry point, longitude.
|
||||
* @param altitude [m] Altitude.
|
||||
* @param expected_travel_distance [m] Distance the aircraft expects to travel during the deepstall.
|
||||
* @param cross_track_error [m] Deepstall cross track error (only valid when in DEEPSTALL_STAGE_LAND).
|
||||
* @param stage Deepstall stage.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_deepstall_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
int32_t landing_lat, int32_t landing_lon, int32_t path_lat, int32_t path_lon, int32_t arc_entry_lat, int32_t arc_entry_lon, float altitude, float expected_travel_distance, float cross_track_error, uint8_t stage)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_DEEPSTALL_LEN];
|
||||
_mav_put_int32_t(buf, 0, landing_lat);
|
||||
_mav_put_int32_t(buf, 4, landing_lon);
|
||||
_mav_put_int32_t(buf, 8, path_lat);
|
||||
_mav_put_int32_t(buf, 12, path_lon);
|
||||
_mav_put_int32_t(buf, 16, arc_entry_lat);
|
||||
_mav_put_int32_t(buf, 20, arc_entry_lon);
|
||||
_mav_put_float(buf, 24, altitude);
|
||||
_mav_put_float(buf, 28, expected_travel_distance);
|
||||
_mav_put_float(buf, 32, cross_track_error);
|
||||
_mav_put_uint8_t(buf, 36, stage);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DEEPSTALL_LEN);
|
||||
#else
|
||||
mavlink_deepstall_t packet;
|
||||
packet.landing_lat = landing_lat;
|
||||
packet.landing_lon = landing_lon;
|
||||
packet.path_lat = path_lat;
|
||||
packet.path_lon = path_lon;
|
||||
packet.arc_entry_lat = arc_entry_lat;
|
||||
packet.arc_entry_lon = arc_entry_lon;
|
||||
packet.altitude = altitude;
|
||||
packet.expected_travel_distance = expected_travel_distance;
|
||||
packet.cross_track_error = cross_track_error;
|
||||
packet.stage = stage;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DEEPSTALL_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_DEEPSTALL;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_DEEPSTALL_MIN_LEN, MAVLINK_MSG_ID_DEEPSTALL_LEN, MAVLINK_MSG_ID_DEEPSTALL_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_DEEPSTALL_MIN_LEN, MAVLINK_MSG_ID_DEEPSTALL_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a deepstall message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -200,6 +260,20 @@ static inline uint16_t mavlink_msg_deepstall_encode_chan(uint8_t system_id, uint
|
||||
return mavlink_msg_deepstall_pack_chan(system_id, component_id, chan, msg, deepstall->landing_lat, deepstall->landing_lon, deepstall->path_lat, deepstall->path_lon, deepstall->arc_entry_lat, deepstall->arc_entry_lon, deepstall->altitude, deepstall->expected_travel_distance, deepstall->cross_track_error, deepstall->stage);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a deepstall struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param deepstall C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_deepstall_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_deepstall_t* deepstall)
|
||||
{
|
||||
return mavlink_msg_deepstall_pack_status(system_id, component_id, _status, msg, deepstall->landing_lat, deepstall->landing_lon, deepstall->path_lat, deepstall->path_lon, deepstall->arc_entry_lat, deepstall->arc_entry_lon, deepstall->altitude, deepstall->expected_travel_distance, deepstall->cross_track_error, deepstall->stage);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a deepstall message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -115,6 +115,64 @@ static inline uint16_t mavlink_msg_device_op_read_pack(uint8_t system_id, uint8_
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DEVICE_OP_READ_MIN_LEN, MAVLINK_MSG_ID_DEVICE_OP_READ_LEN, MAVLINK_MSG_ID_DEVICE_OP_READ_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a device_op_read message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target_system System ID.
|
||||
* @param target_component Component ID.
|
||||
* @param request_id Request ID - copied to reply.
|
||||
* @param bustype The bus type.
|
||||
* @param bus Bus number.
|
||||
* @param address Bus address.
|
||||
* @param busname Name of device on bus (for SPI).
|
||||
* @param regstart First register to read.
|
||||
* @param count Count of registers to read.
|
||||
* @param bank Bank number.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_device_op_read_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, uint32_t request_id, uint8_t bustype, uint8_t bus, uint8_t address, const char *busname, uint8_t regstart, uint8_t count, uint8_t bank)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_DEVICE_OP_READ_LEN];
|
||||
_mav_put_uint32_t(buf, 0, request_id);
|
||||
_mav_put_uint8_t(buf, 4, target_system);
|
||||
_mav_put_uint8_t(buf, 5, target_component);
|
||||
_mav_put_uint8_t(buf, 6, bustype);
|
||||
_mav_put_uint8_t(buf, 7, bus);
|
||||
_mav_put_uint8_t(buf, 8, address);
|
||||
_mav_put_uint8_t(buf, 49, regstart);
|
||||
_mav_put_uint8_t(buf, 50, count);
|
||||
_mav_put_uint8_t(buf, 51, bank);
|
||||
_mav_put_char_array(buf, 9, busname, 40);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DEVICE_OP_READ_LEN);
|
||||
#else
|
||||
mavlink_device_op_read_t packet;
|
||||
packet.request_id = request_id;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
packet.bustype = bustype;
|
||||
packet.bus = bus;
|
||||
packet.address = address;
|
||||
packet.regstart = regstart;
|
||||
packet.count = count;
|
||||
packet.bank = bank;
|
||||
mav_array_memcpy(packet.busname, busname, sizeof(char)*40);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DEVICE_OP_READ_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_DEVICE_OP_READ;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_DEVICE_OP_READ_MIN_LEN, MAVLINK_MSG_ID_DEVICE_OP_READ_LEN, MAVLINK_MSG_ID_DEVICE_OP_READ_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_DEVICE_OP_READ_MIN_LEN, MAVLINK_MSG_ID_DEVICE_OP_READ_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a device_op_read message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -196,6 +254,20 @@ static inline uint16_t mavlink_msg_device_op_read_encode_chan(uint8_t system_id,
|
||||
return mavlink_msg_device_op_read_pack_chan(system_id, component_id, chan, msg, device_op_read->target_system, device_op_read->target_component, device_op_read->request_id, device_op_read->bustype, device_op_read->bus, device_op_read->address, device_op_read->busname, device_op_read->regstart, device_op_read->count, device_op_read->bank);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a device_op_read struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param device_op_read C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_device_op_read_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_device_op_read_t* device_op_read)
|
||||
{
|
||||
return mavlink_msg_device_op_read_pack_status(system_id, component_id, _status, msg, device_op_read->target_system, device_op_read->target_component, device_op_read->request_id, device_op_read->bustype, device_op_read->bus, device_op_read->address, device_op_read->busname, device_op_read->regstart, device_op_read->count, device_op_read->bank);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a device_op_read message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -91,6 +91,52 @@ static inline uint16_t mavlink_msg_device_op_read_reply_pack(uint8_t system_id,
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_MIN_LEN, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_LEN, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a device_op_read_reply message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param request_id Request ID - copied from request.
|
||||
* @param result 0 for success, anything else is failure code.
|
||||
* @param regstart Starting register.
|
||||
* @param count Count of bytes read.
|
||||
* @param data Reply data.
|
||||
* @param bank Bank number.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_device_op_read_reply_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint32_t request_id, uint8_t result, uint8_t regstart, uint8_t count, const uint8_t *data, uint8_t bank)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_LEN];
|
||||
_mav_put_uint32_t(buf, 0, request_id);
|
||||
_mav_put_uint8_t(buf, 4, result);
|
||||
_mav_put_uint8_t(buf, 5, regstart);
|
||||
_mav_put_uint8_t(buf, 6, count);
|
||||
_mav_put_uint8_t(buf, 135, bank);
|
||||
_mav_put_uint8_t_array(buf, 7, data, 128);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_LEN);
|
||||
#else
|
||||
mavlink_device_op_read_reply_t packet;
|
||||
packet.request_id = request_id;
|
||||
packet.result = result;
|
||||
packet.regstart = regstart;
|
||||
packet.count = count;
|
||||
packet.bank = bank;
|
||||
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*128);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_MIN_LEN, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_LEN, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_MIN_LEN, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a device_op_read_reply message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -160,6 +206,20 @@ static inline uint16_t mavlink_msg_device_op_read_reply_encode_chan(uint8_t syst
|
||||
return mavlink_msg_device_op_read_reply_pack_chan(system_id, component_id, chan, msg, device_op_read_reply->request_id, device_op_read_reply->result, device_op_read_reply->regstart, device_op_read_reply->count, device_op_read_reply->data, device_op_read_reply->bank);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a device_op_read_reply struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param device_op_read_reply C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_device_op_read_reply_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_device_op_read_reply_t* device_op_read_reply)
|
||||
{
|
||||
return mavlink_msg_device_op_read_reply_pack_status(system_id, component_id, _status, msg, device_op_read_reply->request_id, device_op_read_reply->result, device_op_read_reply->regstart, device_op_read_reply->count, device_op_read_reply->data, device_op_read_reply->bank);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a device_op_read_reply message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -122,6 +122,67 @@ static inline uint16_t mavlink_msg_device_op_write_pack(uint8_t system_id, uint8
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DEVICE_OP_WRITE_MIN_LEN, MAVLINK_MSG_ID_DEVICE_OP_WRITE_LEN, MAVLINK_MSG_ID_DEVICE_OP_WRITE_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a device_op_write message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target_system System ID.
|
||||
* @param target_component Component ID.
|
||||
* @param request_id Request ID - copied to reply.
|
||||
* @param bustype The bus type.
|
||||
* @param bus Bus number.
|
||||
* @param address Bus address.
|
||||
* @param busname Name of device on bus (for SPI).
|
||||
* @param regstart First register to write.
|
||||
* @param count Count of registers to write.
|
||||
* @param data Write data.
|
||||
* @param bank Bank number.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_device_op_write_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, uint32_t request_id, uint8_t bustype, uint8_t bus, uint8_t address, const char *busname, uint8_t regstart, uint8_t count, const uint8_t *data, uint8_t bank)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_DEVICE_OP_WRITE_LEN];
|
||||
_mav_put_uint32_t(buf, 0, request_id);
|
||||
_mav_put_uint8_t(buf, 4, target_system);
|
||||
_mav_put_uint8_t(buf, 5, target_component);
|
||||
_mav_put_uint8_t(buf, 6, bustype);
|
||||
_mav_put_uint8_t(buf, 7, bus);
|
||||
_mav_put_uint8_t(buf, 8, address);
|
||||
_mav_put_uint8_t(buf, 49, regstart);
|
||||
_mav_put_uint8_t(buf, 50, count);
|
||||
_mav_put_uint8_t(buf, 179, bank);
|
||||
_mav_put_char_array(buf, 9, busname, 40);
|
||||
_mav_put_uint8_t_array(buf, 51, data, 128);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DEVICE_OP_WRITE_LEN);
|
||||
#else
|
||||
mavlink_device_op_write_t packet;
|
||||
packet.request_id = request_id;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
packet.bustype = bustype;
|
||||
packet.bus = bus;
|
||||
packet.address = address;
|
||||
packet.regstart = regstart;
|
||||
packet.count = count;
|
||||
packet.bank = bank;
|
||||
mav_array_memcpy(packet.busname, busname, sizeof(char)*40);
|
||||
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*128);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DEVICE_OP_WRITE_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_DEVICE_OP_WRITE;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_DEVICE_OP_WRITE_MIN_LEN, MAVLINK_MSG_ID_DEVICE_OP_WRITE_LEN, MAVLINK_MSG_ID_DEVICE_OP_WRITE_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_DEVICE_OP_WRITE_MIN_LEN, MAVLINK_MSG_ID_DEVICE_OP_WRITE_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a device_op_write message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -206,6 +267,20 @@ static inline uint16_t mavlink_msg_device_op_write_encode_chan(uint8_t system_id
|
||||
return mavlink_msg_device_op_write_pack_chan(system_id, component_id, chan, msg, device_op_write->target_system, device_op_write->target_component, device_op_write->request_id, device_op_write->bustype, device_op_write->bus, device_op_write->address, device_op_write->busname, device_op_write->regstart, device_op_write->count, device_op_write->data, device_op_write->bank);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a device_op_write struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param device_op_write C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_device_op_write_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_device_op_write_t* device_op_write)
|
||||
{
|
||||
return mavlink_msg_device_op_write_pack_status(system_id, component_id, _status, msg, device_op_write->target_system, device_op_write->target_component, device_op_write->request_id, device_op_write->bustype, device_op_write->bus, device_op_write->address, device_op_write->busname, device_op_write->regstart, device_op_write->count, device_op_write->data, device_op_write->bank);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a device_op_write message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -69,6 +69,42 @@ static inline uint16_t mavlink_msg_device_op_write_reply_pack(uint8_t system_id,
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DEVICE_OP_WRITE_REPLY_MIN_LEN, MAVLINK_MSG_ID_DEVICE_OP_WRITE_REPLY_LEN, MAVLINK_MSG_ID_DEVICE_OP_WRITE_REPLY_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a device_op_write_reply message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param request_id Request ID - copied from request.
|
||||
* @param result 0 for success, anything else is failure code.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_device_op_write_reply_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint32_t request_id, uint8_t result)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_DEVICE_OP_WRITE_REPLY_LEN];
|
||||
_mav_put_uint32_t(buf, 0, request_id);
|
||||
_mav_put_uint8_t(buf, 4, result);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DEVICE_OP_WRITE_REPLY_LEN);
|
||||
#else
|
||||
mavlink_device_op_write_reply_t packet;
|
||||
packet.request_id = request_id;
|
||||
packet.result = result;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DEVICE_OP_WRITE_REPLY_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_DEVICE_OP_WRITE_REPLY;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_DEVICE_OP_WRITE_REPLY_MIN_LEN, MAVLINK_MSG_ID_DEVICE_OP_WRITE_REPLY_LEN, MAVLINK_MSG_ID_DEVICE_OP_WRITE_REPLY_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_DEVICE_OP_WRITE_REPLY_MIN_LEN, MAVLINK_MSG_ID_DEVICE_OP_WRITE_REPLY_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a device_op_write_reply message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -128,6 +164,20 @@ static inline uint16_t mavlink_msg_device_op_write_reply_encode_chan(uint8_t sys
|
||||
return mavlink_msg_device_op_write_reply_pack_chan(system_id, component_id, chan, msg, device_op_write_reply->request_id, device_op_write_reply->result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a device_op_write_reply struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param device_op_write_reply C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_device_op_write_reply_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_device_op_write_reply_t* device_op_write_reply)
|
||||
{
|
||||
return mavlink_msg_device_op_write_reply_pack_status(system_id, component_id, _status, msg, device_op_write_reply->request_id, device_op_write_reply->result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a device_op_write_reply message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -123,6 +123,69 @@ static inline uint16_t mavlink_msg_digicam_configure_pack(uint8_t system_id, uin
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_MIN_LEN, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a digicam_configure message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target_system System ID.
|
||||
* @param target_component Component ID.
|
||||
* @param mode Mode enumeration from 1 to N //P, TV, AV, M, etc. (0 means ignore).
|
||||
* @param shutter_speed Divisor number //e.g. 1000 means 1/1000 (0 means ignore).
|
||||
* @param aperture F stop number x 10 //e.g. 28 means 2.8 (0 means ignore).
|
||||
* @param iso ISO enumeration from 1 to N //e.g. 80, 100, 200, Etc (0 means ignore).
|
||||
* @param exposure_type Exposure type enumeration from 1 to N (0 means ignore).
|
||||
* @param command_id Command Identity (incremental loop: 0 to 255). //A command sent multiple times will be executed or pooled just once.
|
||||
* @param engine_cut_off [ds] Main engine cut-off time before camera trigger (0 means no cut-off).
|
||||
* @param extra_param Extra parameters enumeration (0 means ignore).
|
||||
* @param extra_value Correspondent value to given extra_param.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_digicam_configure_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, uint8_t mode, uint16_t shutter_speed, uint8_t aperture, uint8_t iso, uint8_t exposure_type, uint8_t command_id, uint8_t engine_cut_off, uint8_t extra_param, float extra_value)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN];
|
||||
_mav_put_float(buf, 0, extra_value);
|
||||
_mav_put_uint16_t(buf, 4, shutter_speed);
|
||||
_mav_put_uint8_t(buf, 6, target_system);
|
||||
_mav_put_uint8_t(buf, 7, target_component);
|
||||
_mav_put_uint8_t(buf, 8, mode);
|
||||
_mav_put_uint8_t(buf, 9, aperture);
|
||||
_mav_put_uint8_t(buf, 10, iso);
|
||||
_mav_put_uint8_t(buf, 11, exposure_type);
|
||||
_mav_put_uint8_t(buf, 12, command_id);
|
||||
_mav_put_uint8_t(buf, 13, engine_cut_off);
|
||||
_mav_put_uint8_t(buf, 14, extra_param);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN);
|
||||
#else
|
||||
mavlink_digicam_configure_t packet;
|
||||
packet.extra_value = extra_value;
|
||||
packet.shutter_speed = shutter_speed;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
packet.mode = mode;
|
||||
packet.aperture = aperture;
|
||||
packet.iso = iso;
|
||||
packet.exposure_type = exposure_type;
|
||||
packet.command_id = command_id;
|
||||
packet.engine_cut_off = engine_cut_off;
|
||||
packet.extra_param = extra_param;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_DIGICAM_CONFIGURE;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_MIN_LEN, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_MIN_LEN, MAVLINK_MSG_ID_DIGICAM_CONFIGURE_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a digicam_configure message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -209,6 +272,20 @@ static inline uint16_t mavlink_msg_digicam_configure_encode_chan(uint8_t system_
|
||||
return mavlink_msg_digicam_configure_pack_chan(system_id, component_id, chan, msg, digicam_configure->target_system, digicam_configure->target_component, digicam_configure->mode, digicam_configure->shutter_speed, digicam_configure->aperture, digicam_configure->iso, digicam_configure->exposure_type, digicam_configure->command_id, digicam_configure->engine_cut_off, digicam_configure->extra_param, digicam_configure->extra_value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a digicam_configure struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param digicam_configure C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_digicam_configure_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_digicam_configure_t* digicam_configure)
|
||||
{
|
||||
return mavlink_msg_digicam_configure_pack_status(system_id, component_id, _status, msg, digicam_configure->target_system, digicam_configure->target_component, digicam_configure->mode, digicam_configure->shutter_speed, digicam_configure->aperture, digicam_configure->iso, digicam_configure->exposure_type, digicam_configure->command_id, digicam_configure->engine_cut_off, digicam_configure->extra_param, digicam_configure->extra_value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a digicam_configure message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -117,6 +117,66 @@ static inline uint16_t mavlink_msg_digicam_control_pack(uint8_t system_id, uint8
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DIGICAM_CONTROL_MIN_LEN, MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN, MAVLINK_MSG_ID_DIGICAM_CONTROL_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a digicam_control message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target_system System ID.
|
||||
* @param target_component Component ID.
|
||||
* @param session 0: stop, 1: start or keep it up //Session control e.g. show/hide lens.
|
||||
* @param zoom_pos 1 to N //Zoom's absolute position (0 means ignore).
|
||||
* @param zoom_step -100 to 100 //Zooming step value to offset zoom from the current position.
|
||||
* @param focus_lock 0: unlock focus or keep unlocked, 1: lock focus or keep locked, 3: re-lock focus.
|
||||
* @param shot 0: ignore, 1: shot or start filming.
|
||||
* @param command_id Command Identity (incremental loop: 0 to 255)//A command sent multiple times will be executed or pooled just once.
|
||||
* @param extra_param Extra parameters enumeration (0 means ignore).
|
||||
* @param extra_value Correspondent value to given extra_param.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_digicam_control_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, uint8_t session, uint8_t zoom_pos, int8_t zoom_step, uint8_t focus_lock, uint8_t shot, uint8_t command_id, uint8_t extra_param, float extra_value)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN];
|
||||
_mav_put_float(buf, 0, extra_value);
|
||||
_mav_put_uint8_t(buf, 4, target_system);
|
||||
_mav_put_uint8_t(buf, 5, target_component);
|
||||
_mav_put_uint8_t(buf, 6, session);
|
||||
_mav_put_uint8_t(buf, 7, zoom_pos);
|
||||
_mav_put_int8_t(buf, 8, zoom_step);
|
||||
_mav_put_uint8_t(buf, 9, focus_lock);
|
||||
_mav_put_uint8_t(buf, 10, shot);
|
||||
_mav_put_uint8_t(buf, 11, command_id);
|
||||
_mav_put_uint8_t(buf, 12, extra_param);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN);
|
||||
#else
|
||||
mavlink_digicam_control_t packet;
|
||||
packet.extra_value = extra_value;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
packet.session = session;
|
||||
packet.zoom_pos = zoom_pos;
|
||||
packet.zoom_step = zoom_step;
|
||||
packet.focus_lock = focus_lock;
|
||||
packet.shot = shot;
|
||||
packet.command_id = command_id;
|
||||
packet.extra_param = extra_param;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_DIGICAM_CONTROL;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_DIGICAM_CONTROL_MIN_LEN, MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN, MAVLINK_MSG_ID_DIGICAM_CONTROL_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_DIGICAM_CONTROL_MIN_LEN, MAVLINK_MSG_ID_DIGICAM_CONTROL_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a digicam_control message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -200,6 +260,20 @@ static inline uint16_t mavlink_msg_digicam_control_encode_chan(uint8_t system_id
|
||||
return mavlink_msg_digicam_control_pack_chan(system_id, component_id, chan, msg, digicam_control->target_system, digicam_control->target_component, digicam_control->session, digicam_control->zoom_pos, digicam_control->zoom_step, digicam_control->focus_lock, digicam_control->shot, digicam_control->command_id, digicam_control->extra_param, digicam_control->extra_value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a digicam_control struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param digicam_control C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_digicam_control_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_digicam_control_t* digicam_control)
|
||||
{
|
||||
return mavlink_msg_digicam_control_pack_status(system_id, component_id, _status, msg, digicam_control->target_system, digicam_control->target_component, digicam_control->session, digicam_control->zoom_pos, digicam_control->zoom_step, digicam_control->focus_lock, digicam_control->shot, digicam_control->command_id, digicam_control->extra_param, digicam_control->extra_value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a digicam_control message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -99,6 +99,57 @@ static inline uint16_t mavlink_msg_ekf_status_report_pack(uint8_t system_id, uin
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_EKF_STATUS_REPORT_MIN_LEN, MAVLINK_MSG_ID_EKF_STATUS_REPORT_LEN, MAVLINK_MSG_ID_EKF_STATUS_REPORT_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a ekf_status_report message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param flags Flags.
|
||||
* @param velocity_variance Velocity variance.
|
||||
* @param pos_horiz_variance Horizontal Position variance.
|
||||
* @param pos_vert_variance Vertical Position variance.
|
||||
* @param compass_variance Compass variance.
|
||||
* @param terrain_alt_variance Terrain Altitude variance.
|
||||
* @param airspeed_variance Airspeed variance.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_ekf_status_report_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint16_t flags, float velocity_variance, float pos_horiz_variance, float pos_vert_variance, float compass_variance, float terrain_alt_variance, float airspeed_variance)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_EKF_STATUS_REPORT_LEN];
|
||||
_mav_put_float(buf, 0, velocity_variance);
|
||||
_mav_put_float(buf, 4, pos_horiz_variance);
|
||||
_mav_put_float(buf, 8, pos_vert_variance);
|
||||
_mav_put_float(buf, 12, compass_variance);
|
||||
_mav_put_float(buf, 16, terrain_alt_variance);
|
||||
_mav_put_uint16_t(buf, 20, flags);
|
||||
_mav_put_float(buf, 22, airspeed_variance);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_EKF_STATUS_REPORT_LEN);
|
||||
#else
|
||||
mavlink_ekf_status_report_t packet;
|
||||
packet.velocity_variance = velocity_variance;
|
||||
packet.pos_horiz_variance = pos_horiz_variance;
|
||||
packet.pos_vert_variance = pos_vert_variance;
|
||||
packet.compass_variance = compass_variance;
|
||||
packet.terrain_alt_variance = terrain_alt_variance;
|
||||
packet.flags = flags;
|
||||
packet.airspeed_variance = airspeed_variance;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_EKF_STATUS_REPORT_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_EKF_STATUS_REPORT;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_EKF_STATUS_REPORT_MIN_LEN, MAVLINK_MSG_ID_EKF_STATUS_REPORT_LEN, MAVLINK_MSG_ID_EKF_STATUS_REPORT_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_EKF_STATUS_REPORT_MIN_LEN, MAVLINK_MSG_ID_EKF_STATUS_REPORT_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a ekf_status_report message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -173,6 +224,20 @@ static inline uint16_t mavlink_msg_ekf_status_report_encode_chan(uint8_t system_
|
||||
return mavlink_msg_ekf_status_report_pack_chan(system_id, component_id, chan, msg, ekf_status_report->flags, ekf_status_report->velocity_variance, ekf_status_report->pos_horiz_variance, ekf_status_report->pos_vert_variance, ekf_status_report->compass_variance, ekf_status_report->terrain_alt_variance, ekf_status_report->airspeed_variance);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a ekf_status_report struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param ekf_status_report C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_ekf_status_report_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_ekf_status_report_t* ekf_status_report)
|
||||
{
|
||||
return mavlink_msg_ekf_status_report_pack_status(system_id, component_id, _status, msg, ekf_status_report->flags, ekf_status_report->velocity_variance, ekf_status_report->pos_horiz_variance, ekf_status_report->pos_vert_variance, ekf_status_report->compass_variance, ekf_status_report->terrain_alt_variance, ekf_status_report->airspeed_variance);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a ekf_status_report message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -98,6 +98,54 @@ static inline uint16_t mavlink_msg_esc_telemetry_1_to_4_pack(uint8_t system_id,
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ESC_TELEMETRY_1_TO_4_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_1_TO_4_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_1_TO_4_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a esc_telemetry_1_to_4 message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param temperature [degC] Temperature.
|
||||
* @param voltage [cV] Voltage.
|
||||
* @param current [cA] Current.
|
||||
* @param totalcurrent [mAh] Total current.
|
||||
* @param rpm [rpm] RPM (eRPM).
|
||||
* @param count count of telemetry packets received (wraps at 65535).
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_esc_telemetry_1_to_4_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_1_TO_4_LEN];
|
||||
|
||||
_mav_put_uint16_t_array(buf, 0, voltage, 4);
|
||||
_mav_put_uint16_t_array(buf, 8, current, 4);
|
||||
_mav_put_uint16_t_array(buf, 16, totalcurrent, 4);
|
||||
_mav_put_uint16_t_array(buf, 24, rpm, 4);
|
||||
_mav_put_uint16_t_array(buf, 32, count, 4);
|
||||
_mav_put_uint8_t_array(buf, 40, temperature, 4);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_1_TO_4_LEN);
|
||||
#else
|
||||
mavlink_esc_telemetry_1_to_4_t packet;
|
||||
|
||||
mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4);
|
||||
mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4);
|
||||
mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4);
|
||||
mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4);
|
||||
mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4);
|
||||
mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_1_TO_4_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_1_TO_4;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_TELEMETRY_1_TO_4_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_1_TO_4_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_1_TO_4_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_TELEMETRY_1_TO_4_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_1_TO_4_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a esc_telemetry_1_to_4 message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -169,6 +217,20 @@ static inline uint16_t mavlink_msg_esc_telemetry_1_to_4_encode_chan(uint8_t syst
|
||||
return mavlink_msg_esc_telemetry_1_to_4_pack_chan(system_id, component_id, chan, msg, esc_telemetry_1_to_4->temperature, esc_telemetry_1_to_4->voltage, esc_telemetry_1_to_4->current, esc_telemetry_1_to_4->totalcurrent, esc_telemetry_1_to_4->rpm, esc_telemetry_1_to_4->count);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a esc_telemetry_1_to_4 struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param esc_telemetry_1_to_4 C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_esc_telemetry_1_to_4_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_esc_telemetry_1_to_4_t* esc_telemetry_1_to_4)
|
||||
{
|
||||
return mavlink_msg_esc_telemetry_1_to_4_pack_status(system_id, component_id, _status, msg, esc_telemetry_1_to_4->temperature, esc_telemetry_1_to_4->voltage, esc_telemetry_1_to_4->current, esc_telemetry_1_to_4->totalcurrent, esc_telemetry_1_to_4->rpm, esc_telemetry_1_to_4->count);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a esc_telemetry_1_to_4 message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -98,6 +98,54 @@ static inline uint16_t mavlink_msg_esc_telemetry_5_to_8_pack(uint8_t system_id,
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ESC_TELEMETRY_5_TO_8_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_5_TO_8_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_5_TO_8_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a esc_telemetry_5_to_8 message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param temperature [degC] Temperature.
|
||||
* @param voltage [cV] Voltage.
|
||||
* @param current [cA] Current.
|
||||
* @param totalcurrent [mAh] Total current.
|
||||
* @param rpm [rpm] RPM (eRPM).
|
||||
* @param count count of telemetry packets received (wraps at 65535).
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_esc_telemetry_5_to_8_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_5_TO_8_LEN];
|
||||
|
||||
_mav_put_uint16_t_array(buf, 0, voltage, 4);
|
||||
_mav_put_uint16_t_array(buf, 8, current, 4);
|
||||
_mav_put_uint16_t_array(buf, 16, totalcurrent, 4);
|
||||
_mav_put_uint16_t_array(buf, 24, rpm, 4);
|
||||
_mav_put_uint16_t_array(buf, 32, count, 4);
|
||||
_mav_put_uint8_t_array(buf, 40, temperature, 4);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_5_TO_8_LEN);
|
||||
#else
|
||||
mavlink_esc_telemetry_5_to_8_t packet;
|
||||
|
||||
mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4);
|
||||
mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4);
|
||||
mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4);
|
||||
mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4);
|
||||
mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4);
|
||||
mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_5_TO_8_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_5_TO_8;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_TELEMETRY_5_TO_8_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_5_TO_8_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_5_TO_8_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_TELEMETRY_5_TO_8_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_5_TO_8_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a esc_telemetry_5_to_8 message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -169,6 +217,20 @@ static inline uint16_t mavlink_msg_esc_telemetry_5_to_8_encode_chan(uint8_t syst
|
||||
return mavlink_msg_esc_telemetry_5_to_8_pack_chan(system_id, component_id, chan, msg, esc_telemetry_5_to_8->temperature, esc_telemetry_5_to_8->voltage, esc_telemetry_5_to_8->current, esc_telemetry_5_to_8->totalcurrent, esc_telemetry_5_to_8->rpm, esc_telemetry_5_to_8->count);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a esc_telemetry_5_to_8 struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param esc_telemetry_5_to_8 C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_esc_telemetry_5_to_8_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_esc_telemetry_5_to_8_t* esc_telemetry_5_to_8)
|
||||
{
|
||||
return mavlink_msg_esc_telemetry_5_to_8_pack_status(system_id, component_id, _status, msg, esc_telemetry_5_to_8->temperature, esc_telemetry_5_to_8->voltage, esc_telemetry_5_to_8->current, esc_telemetry_5_to_8->totalcurrent, esc_telemetry_5_to_8->rpm, esc_telemetry_5_to_8->count);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a esc_telemetry_5_to_8 message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -98,6 +98,54 @@ static inline uint16_t mavlink_msg_esc_telemetry_9_to_12_pack(uint8_t system_id,
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ESC_TELEMETRY_9_TO_12_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_9_TO_12_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_9_TO_12_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a esc_telemetry_9_to_12 message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param temperature [degC] Temperature.
|
||||
* @param voltage [cV] Voltage.
|
||||
* @param current [cA] Current.
|
||||
* @param totalcurrent [mAh] Total current.
|
||||
* @param rpm [rpm] RPM (eRPM).
|
||||
* @param count count of telemetry packets received (wraps at 65535).
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_esc_telemetry_9_to_12_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
const uint8_t *temperature, const uint16_t *voltage, const uint16_t *current, const uint16_t *totalcurrent, const uint16_t *rpm, const uint16_t *count)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_ESC_TELEMETRY_9_TO_12_LEN];
|
||||
|
||||
_mav_put_uint16_t_array(buf, 0, voltage, 4);
|
||||
_mav_put_uint16_t_array(buf, 8, current, 4);
|
||||
_mav_put_uint16_t_array(buf, 16, totalcurrent, 4);
|
||||
_mav_put_uint16_t_array(buf, 24, rpm, 4);
|
||||
_mav_put_uint16_t_array(buf, 32, count, 4);
|
||||
_mav_put_uint8_t_array(buf, 40, temperature, 4);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ESC_TELEMETRY_9_TO_12_LEN);
|
||||
#else
|
||||
mavlink_esc_telemetry_9_to_12_t packet;
|
||||
|
||||
mav_array_memcpy(packet.voltage, voltage, sizeof(uint16_t)*4);
|
||||
mav_array_memcpy(packet.current, current, sizeof(uint16_t)*4);
|
||||
mav_array_memcpy(packet.totalcurrent, totalcurrent, sizeof(uint16_t)*4);
|
||||
mav_array_memcpy(packet.rpm, rpm, sizeof(uint16_t)*4);
|
||||
mav_array_memcpy(packet.count, count, sizeof(uint16_t)*4);
|
||||
mav_array_memcpy(packet.temperature, temperature, sizeof(uint8_t)*4);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_TELEMETRY_9_TO_12_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_ESC_TELEMETRY_9_TO_12;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_TELEMETRY_9_TO_12_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_9_TO_12_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_9_TO_12_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_TELEMETRY_9_TO_12_MIN_LEN, MAVLINK_MSG_ID_ESC_TELEMETRY_9_TO_12_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a esc_telemetry_9_to_12 message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -169,6 +217,20 @@ static inline uint16_t mavlink_msg_esc_telemetry_9_to_12_encode_chan(uint8_t sys
|
||||
return mavlink_msg_esc_telemetry_9_to_12_pack_chan(system_id, component_id, chan, msg, esc_telemetry_9_to_12->temperature, esc_telemetry_9_to_12->voltage, esc_telemetry_9_to_12->current, esc_telemetry_9_to_12->totalcurrent, esc_telemetry_9_to_12->rpm, esc_telemetry_9_to_12->count);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a esc_telemetry_9_to_12 struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param esc_telemetry_9_to_12 C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_esc_telemetry_9_to_12_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_esc_telemetry_9_to_12_t* esc_telemetry_9_to_12)
|
||||
{
|
||||
return mavlink_msg_esc_telemetry_9_to_12_pack_status(system_id, component_id, _status, msg, esc_telemetry_9_to_12->temperature, esc_telemetry_9_to_12->voltage, esc_telemetry_9_to_12->current, esc_telemetry_9_to_12->totalcurrent, esc_telemetry_9_to_12->rpm, esc_telemetry_9_to_12->count);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a esc_telemetry_9_to_12 message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -75,6 +75,45 @@ static inline uint16_t mavlink_msg_fence_fetch_point_pack(uint8_t system_id, uin
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FENCE_FETCH_POINT_MIN_LEN, MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN, MAVLINK_MSG_ID_FENCE_FETCH_POINT_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a fence_fetch_point message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target_system System ID.
|
||||
* @param target_component Component ID.
|
||||
* @param idx Point index (first point is 1, 0 is for return point).
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fence_fetch_point_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, uint8_t idx)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN];
|
||||
_mav_put_uint8_t(buf, 0, target_system);
|
||||
_mav_put_uint8_t(buf, 1, target_component);
|
||||
_mav_put_uint8_t(buf, 2, idx);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN);
|
||||
#else
|
||||
mavlink_fence_fetch_point_t packet;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
packet.idx = idx;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_FENCE_FETCH_POINT;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FENCE_FETCH_POINT_MIN_LEN, MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN, MAVLINK_MSG_ID_FENCE_FETCH_POINT_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FENCE_FETCH_POINT_MIN_LEN, MAVLINK_MSG_ID_FENCE_FETCH_POINT_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a fence_fetch_point message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -137,6 +176,20 @@ static inline uint16_t mavlink_msg_fence_fetch_point_encode_chan(uint8_t system_
|
||||
return mavlink_msg_fence_fetch_point_pack_chan(system_id, component_id, chan, msg, fence_fetch_point->target_system, fence_fetch_point->target_component, fence_fetch_point->idx);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a fence_fetch_point struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param fence_fetch_point C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fence_fetch_point_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_fence_fetch_point_t* fence_fetch_point)
|
||||
{
|
||||
return mavlink_msg_fence_fetch_point_pack_status(system_id, component_id, _status, msg, fence_fetch_point->target_system, fence_fetch_point->target_component, fence_fetch_point->idx);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a fence_fetch_point message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -93,6 +93,54 @@ static inline uint16_t mavlink_msg_fence_point_pack(uint8_t system_id, uint8_t c
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FENCE_POINT_MIN_LEN, MAVLINK_MSG_ID_FENCE_POINT_LEN, MAVLINK_MSG_ID_FENCE_POINT_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a fence_point message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target_system System ID.
|
||||
* @param target_component Component ID.
|
||||
* @param idx Point index (first point is 1, 0 is for return point).
|
||||
* @param count Total number of points (for sanity checking).
|
||||
* @param lat [deg] Latitude of point.
|
||||
* @param lng [deg] Longitude of point.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fence_point_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, uint8_t idx, uint8_t count, float lat, float lng)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_FENCE_POINT_LEN];
|
||||
_mav_put_float(buf, 0, lat);
|
||||
_mav_put_float(buf, 4, lng);
|
||||
_mav_put_uint8_t(buf, 8, target_system);
|
||||
_mav_put_uint8_t(buf, 9, target_component);
|
||||
_mav_put_uint8_t(buf, 10, idx);
|
||||
_mav_put_uint8_t(buf, 11, count);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FENCE_POINT_LEN);
|
||||
#else
|
||||
mavlink_fence_point_t packet;
|
||||
packet.lat = lat;
|
||||
packet.lng = lng;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
packet.idx = idx;
|
||||
packet.count = count;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FENCE_POINT_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_FENCE_POINT;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FENCE_POINT_MIN_LEN, MAVLINK_MSG_ID_FENCE_POINT_LEN, MAVLINK_MSG_ID_FENCE_POINT_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_FENCE_POINT_MIN_LEN, MAVLINK_MSG_ID_FENCE_POINT_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a fence_point message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -164,6 +212,20 @@ static inline uint16_t mavlink_msg_fence_point_encode_chan(uint8_t system_id, ui
|
||||
return mavlink_msg_fence_point_pack_chan(system_id, component_id, chan, msg, fence_point->target_system, fence_point->target_component, fence_point->idx, fence_point->count, fence_point->lat, fence_point->lng);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a fence_point struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param fence_point C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_fence_point_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_fence_point_t* fence_point)
|
||||
{
|
||||
return mavlink_msg_fence_point_pack_status(system_id, component_id, _status, msg, fence_point->target_system, fence_point->target_component, fence_point->idx, fence_point->count, fence_point->lat, fence_point->lng);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a fence_point message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -87,6 +87,51 @@ static inline uint16_t mavlink_msg_gimbal_control_pack(uint8_t system_id, uint8_
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_CONTROL_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_CONTROL_LEN, MAVLINK_MSG_ID_GIMBAL_CONTROL_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a gimbal_control message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target_system System ID.
|
||||
* @param target_component Component ID.
|
||||
* @param demanded_rate_x [rad/s] Demanded angular rate X.
|
||||
* @param demanded_rate_y [rad/s] Demanded angular rate Y.
|
||||
* @param demanded_rate_z [rad/s] Demanded angular rate Z.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gimbal_control_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, float demanded_rate_x, float demanded_rate_y, float demanded_rate_z)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_GIMBAL_CONTROL_LEN];
|
||||
_mav_put_float(buf, 0, demanded_rate_x);
|
||||
_mav_put_float(buf, 4, demanded_rate_y);
|
||||
_mav_put_float(buf, 8, demanded_rate_z);
|
||||
_mav_put_uint8_t(buf, 12, target_system);
|
||||
_mav_put_uint8_t(buf, 13, target_component);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_CONTROL_LEN);
|
||||
#else
|
||||
mavlink_gimbal_control_t packet;
|
||||
packet.demanded_rate_x = demanded_rate_x;
|
||||
packet.demanded_rate_y = demanded_rate_y;
|
||||
packet.demanded_rate_z = demanded_rate_z;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_CONTROL_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_GIMBAL_CONTROL;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_GIMBAL_CONTROL_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_CONTROL_LEN, MAVLINK_MSG_ID_GIMBAL_CONTROL_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_GIMBAL_CONTROL_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_CONTROL_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a gimbal_control message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -155,6 +200,20 @@ static inline uint16_t mavlink_msg_gimbal_control_encode_chan(uint8_t system_id,
|
||||
return mavlink_msg_gimbal_control_pack_chan(system_id, component_id, chan, msg, gimbal_control->target_system, gimbal_control->target_component, gimbal_control->demanded_rate_x, gimbal_control->demanded_rate_y, gimbal_control->demanded_rate_z);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a gimbal_control struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param gimbal_control C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gimbal_control_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_gimbal_control_t* gimbal_control)
|
||||
{
|
||||
return mavlink_msg_gimbal_control_pack_status(system_id, component_id, _status, msg, gimbal_control->target_system, gimbal_control->target_component, gimbal_control->demanded_rate_x, gimbal_control->demanded_rate_y, gimbal_control->demanded_rate_z);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a gimbal_control message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -129,6 +129,72 @@ static inline uint16_t mavlink_msg_gimbal_report_pack(uint8_t system_id, uint8_t
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_REPORT_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a gimbal_report message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target_system System ID.
|
||||
* @param target_component Component ID.
|
||||
* @param delta_time [s] Time since last update.
|
||||
* @param delta_angle_x [rad] Delta angle X.
|
||||
* @param delta_angle_y [rad] Delta angle Y.
|
||||
* @param delta_angle_z [rad] Delta angle X.
|
||||
* @param delta_velocity_x [m/s] Delta velocity X.
|
||||
* @param delta_velocity_y [m/s] Delta velocity Y.
|
||||
* @param delta_velocity_z [m/s] Delta velocity Z.
|
||||
* @param joint_roll [rad] Joint ROLL.
|
||||
* @param joint_el [rad] Joint EL.
|
||||
* @param joint_az [rad] Joint AZ.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gimbal_report_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, float delta_time, float delta_angle_x, float delta_angle_y, float delta_angle_z, float delta_velocity_x, float delta_velocity_y, float delta_velocity_z, float joint_roll, float joint_el, float joint_az)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_GIMBAL_REPORT_LEN];
|
||||
_mav_put_float(buf, 0, delta_time);
|
||||
_mav_put_float(buf, 4, delta_angle_x);
|
||||
_mav_put_float(buf, 8, delta_angle_y);
|
||||
_mav_put_float(buf, 12, delta_angle_z);
|
||||
_mav_put_float(buf, 16, delta_velocity_x);
|
||||
_mav_put_float(buf, 20, delta_velocity_y);
|
||||
_mav_put_float(buf, 24, delta_velocity_z);
|
||||
_mav_put_float(buf, 28, joint_roll);
|
||||
_mav_put_float(buf, 32, joint_el);
|
||||
_mav_put_float(buf, 36, joint_az);
|
||||
_mav_put_uint8_t(buf, 40, target_system);
|
||||
_mav_put_uint8_t(buf, 41, target_component);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_REPORT_LEN);
|
||||
#else
|
||||
mavlink_gimbal_report_t packet;
|
||||
packet.delta_time = delta_time;
|
||||
packet.delta_angle_x = delta_angle_x;
|
||||
packet.delta_angle_y = delta_angle_y;
|
||||
packet.delta_angle_z = delta_angle_z;
|
||||
packet.delta_velocity_x = delta_velocity_x;
|
||||
packet.delta_velocity_y = delta_velocity_y;
|
||||
packet.delta_velocity_z = delta_velocity_z;
|
||||
packet.joint_roll = joint_roll;
|
||||
packet.joint_el = joint_el;
|
||||
packet.joint_az = joint_az;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_REPORT_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_GIMBAL_REPORT;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_GIMBAL_REPORT_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_GIMBAL_REPORT_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_REPORT_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a gimbal_report message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -218,6 +284,20 @@ static inline uint16_t mavlink_msg_gimbal_report_encode_chan(uint8_t system_id,
|
||||
return mavlink_msg_gimbal_report_pack_chan(system_id, component_id, chan, msg, gimbal_report->target_system, gimbal_report->target_component, gimbal_report->delta_time, gimbal_report->delta_angle_x, gimbal_report->delta_angle_y, gimbal_report->delta_angle_z, gimbal_report->delta_velocity_x, gimbal_report->delta_velocity_y, gimbal_report->delta_velocity_z, gimbal_report->joint_roll, gimbal_report->joint_el, gimbal_report->joint_az);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a gimbal_report struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param gimbal_report C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gimbal_report_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_gimbal_report_t* gimbal_report)
|
||||
{
|
||||
return mavlink_msg_gimbal_report_pack_status(system_id, component_id, _status, msg, gimbal_report->target_system, gimbal_report->target_component, gimbal_report->delta_time, gimbal_report->delta_angle_x, gimbal_report->delta_angle_y, gimbal_report->delta_angle_z, gimbal_report->delta_velocity_x, gimbal_report->delta_velocity_y, gimbal_report->delta_velocity_z, gimbal_report->joint_roll, gimbal_report->joint_el, gimbal_report->joint_az);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a gimbal_report message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -87,6 +87,51 @@ static inline uint16_t mavlink_msg_gimbal_torque_cmd_report_pack(uint8_t system_
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a gimbal_torque_cmd_report message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target_system System ID.
|
||||
* @param target_component Component ID.
|
||||
* @param rl_torque_cmd Roll Torque Command.
|
||||
* @param el_torque_cmd Elevation Torque Command.
|
||||
* @param az_torque_cmd Azimuth Torque Command.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gimbal_torque_cmd_report_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, int16_t rl_torque_cmd, int16_t el_torque_cmd, int16_t az_torque_cmd)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN];
|
||||
_mav_put_int16_t(buf, 0, rl_torque_cmd);
|
||||
_mav_put_int16_t(buf, 2, el_torque_cmd);
|
||||
_mav_put_int16_t(buf, 4, az_torque_cmd);
|
||||
_mav_put_uint8_t(buf, 6, target_system);
|
||||
_mav_put_uint8_t(buf, 7, target_component);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN);
|
||||
#else
|
||||
mavlink_gimbal_torque_cmd_report_t packet;
|
||||
packet.rl_torque_cmd = rl_torque_cmd;
|
||||
packet.el_torque_cmd = el_torque_cmd;
|
||||
packet.az_torque_cmd = az_torque_cmd;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_MIN_LEN, MAVLINK_MSG_ID_GIMBAL_TORQUE_CMD_REPORT_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a gimbal_torque_cmd_report message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -155,6 +200,20 @@ static inline uint16_t mavlink_msg_gimbal_torque_cmd_report_encode_chan(uint8_t
|
||||
return mavlink_msg_gimbal_torque_cmd_report_pack_chan(system_id, component_id, chan, msg, gimbal_torque_cmd_report->target_system, gimbal_torque_cmd_report->target_component, gimbal_torque_cmd_report->rl_torque_cmd, gimbal_torque_cmd_report->el_torque_cmd, gimbal_torque_cmd_report->az_torque_cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a gimbal_torque_cmd_report struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param gimbal_torque_cmd_report C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gimbal_torque_cmd_report_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_gimbal_torque_cmd_report_t* gimbal_torque_cmd_report)
|
||||
{
|
||||
return mavlink_msg_gimbal_torque_cmd_report_pack_status(system_id, component_id, _status, msg, gimbal_torque_cmd_report->target_system, gimbal_torque_cmd_report->target_component, gimbal_torque_cmd_report->rl_torque_cmd, gimbal_torque_cmd_report->el_torque_cmd, gimbal_torque_cmd_report->az_torque_cmd);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a gimbal_torque_cmd_report message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -75,6 +75,45 @@ static inline uint16_t mavlink_msg_gopro_get_request_pack(uint8_t system_id, uin
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_MIN_LEN, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a gopro_get_request message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target_system System ID.
|
||||
* @param target_component Component ID.
|
||||
* @param cmd_id Command ID.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gopro_get_request_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, uint8_t cmd_id)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN];
|
||||
_mav_put_uint8_t(buf, 0, target_system);
|
||||
_mav_put_uint8_t(buf, 1, target_component);
|
||||
_mav_put_uint8_t(buf, 2, cmd_id);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN);
|
||||
#else
|
||||
mavlink_gopro_get_request_t packet;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
packet.cmd_id = cmd_id;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_GOPRO_GET_REQUEST;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_MIN_LEN, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_MIN_LEN, MAVLINK_MSG_ID_GOPRO_GET_REQUEST_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a gopro_get_request message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -137,6 +176,20 @@ static inline uint16_t mavlink_msg_gopro_get_request_encode_chan(uint8_t system_
|
||||
return mavlink_msg_gopro_get_request_pack_chan(system_id, component_id, chan, msg, gopro_get_request->target_system, gopro_get_request->target_component, gopro_get_request->cmd_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a gopro_get_request struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param gopro_get_request C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gopro_get_request_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_gopro_get_request_t* gopro_get_request)
|
||||
{
|
||||
return mavlink_msg_gopro_get_request_pack_status(system_id, component_id, _status, msg, gopro_get_request->target_system, gopro_get_request->target_component, gopro_get_request->cmd_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a gopro_get_request message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -73,6 +73,43 @@ static inline uint16_t mavlink_msg_gopro_get_response_pack(uint8_t system_id, ui
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_MIN_LEN, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a gopro_get_response message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param cmd_id Command ID.
|
||||
* @param status Status.
|
||||
* @param value Value.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gopro_get_response_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t cmd_id, uint8_t status, const uint8_t *value)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN];
|
||||
_mav_put_uint8_t(buf, 0, cmd_id);
|
||||
_mav_put_uint8_t(buf, 1, status);
|
||||
_mav_put_uint8_t_array(buf, 2, value, 4);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN);
|
||||
#else
|
||||
mavlink_gopro_get_response_t packet;
|
||||
packet.cmd_id = cmd_id;
|
||||
packet.status = status;
|
||||
mav_array_memcpy(packet.value, value, sizeof(uint8_t)*4);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_GOPRO_GET_RESPONSE;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_MIN_LEN, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_MIN_LEN, MAVLINK_MSG_ID_GOPRO_GET_RESPONSE_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a gopro_get_response message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -133,6 +170,20 @@ static inline uint16_t mavlink_msg_gopro_get_response_encode_chan(uint8_t system
|
||||
return mavlink_msg_gopro_get_response_pack_chan(system_id, component_id, chan, msg, gopro_get_response->cmd_id, gopro_get_response->status, gopro_get_response->value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a gopro_get_response struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param gopro_get_response C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gopro_get_response_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_gopro_get_response_t* gopro_get_response)
|
||||
{
|
||||
return mavlink_msg_gopro_get_response_pack_status(system_id, component_id, _status, msg, gopro_get_response->cmd_id, gopro_get_response->status, gopro_get_response->value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a gopro_get_response message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -75,6 +75,45 @@ static inline uint16_t mavlink_msg_gopro_heartbeat_pack(uint8_t system_id, uint8
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_MIN_LEN, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a gopro_heartbeat message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param status Status.
|
||||
* @param capture_mode Current capture mode.
|
||||
* @param flags Additional status bits.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gopro_heartbeat_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t status, uint8_t capture_mode, uint8_t flags)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN];
|
||||
_mav_put_uint8_t(buf, 0, status);
|
||||
_mav_put_uint8_t(buf, 1, capture_mode);
|
||||
_mav_put_uint8_t(buf, 2, flags);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN);
|
||||
#else
|
||||
mavlink_gopro_heartbeat_t packet;
|
||||
packet.status = status;
|
||||
packet.capture_mode = capture_mode;
|
||||
packet.flags = flags;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_GOPRO_HEARTBEAT;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_MIN_LEN, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_MIN_LEN, MAVLINK_MSG_ID_GOPRO_HEARTBEAT_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a gopro_heartbeat message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -137,6 +176,20 @@ static inline uint16_t mavlink_msg_gopro_heartbeat_encode_chan(uint8_t system_id
|
||||
return mavlink_msg_gopro_heartbeat_pack_chan(system_id, component_id, chan, msg, gopro_heartbeat->status, gopro_heartbeat->capture_mode, gopro_heartbeat->flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a gopro_heartbeat struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param gopro_heartbeat C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gopro_heartbeat_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_gopro_heartbeat_t* gopro_heartbeat)
|
||||
{
|
||||
return mavlink_msg_gopro_heartbeat_pack_status(system_id, component_id, _status, msg, gopro_heartbeat->status, gopro_heartbeat->capture_mode, gopro_heartbeat->flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a gopro_heartbeat message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -79,6 +79,46 @@ static inline uint16_t mavlink_msg_gopro_set_request_pack(uint8_t system_id, uin
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_MIN_LEN, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a gopro_set_request message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target_system System ID.
|
||||
* @param target_component Component ID.
|
||||
* @param cmd_id Command ID.
|
||||
* @param value Value.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gopro_set_request_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, uint8_t cmd_id, const uint8_t *value)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN];
|
||||
_mav_put_uint8_t(buf, 0, target_system);
|
||||
_mav_put_uint8_t(buf, 1, target_component);
|
||||
_mav_put_uint8_t(buf, 2, cmd_id);
|
||||
_mav_put_uint8_t_array(buf, 3, value, 4);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN);
|
||||
#else
|
||||
mavlink_gopro_set_request_t packet;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
packet.cmd_id = cmd_id;
|
||||
mav_array_memcpy(packet.value, value, sizeof(uint8_t)*4);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_GOPRO_SET_REQUEST;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_MIN_LEN, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_MIN_LEN, MAVLINK_MSG_ID_GOPRO_SET_REQUEST_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a gopro_set_request message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -142,6 +182,20 @@ static inline uint16_t mavlink_msg_gopro_set_request_encode_chan(uint8_t system_
|
||||
return mavlink_msg_gopro_set_request_pack_chan(system_id, component_id, chan, msg, gopro_set_request->target_system, gopro_set_request->target_component, gopro_set_request->cmd_id, gopro_set_request->value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a gopro_set_request struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param gopro_set_request C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gopro_set_request_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_gopro_set_request_t* gopro_set_request)
|
||||
{
|
||||
return mavlink_msg_gopro_set_request_pack_status(system_id, component_id, _status, msg, gopro_set_request->target_system, gopro_set_request->target_component, gopro_set_request->cmd_id, gopro_set_request->value);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a gopro_set_request message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -69,6 +69,42 @@ static inline uint16_t mavlink_msg_gopro_set_response_pack(uint8_t system_id, ui
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_MIN_LEN, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a gopro_set_response message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param cmd_id Command ID.
|
||||
* @param status Status.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gopro_set_response_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t cmd_id, uint8_t status)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN];
|
||||
_mav_put_uint8_t(buf, 0, cmd_id);
|
||||
_mav_put_uint8_t(buf, 1, status);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN);
|
||||
#else
|
||||
mavlink_gopro_set_response_t packet;
|
||||
packet.cmd_id = cmd_id;
|
||||
packet.status = status;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_GOPRO_SET_RESPONSE;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_MIN_LEN, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_MIN_LEN, MAVLINK_MSG_ID_GOPRO_SET_RESPONSE_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a gopro_set_response message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -128,6 +164,20 @@ static inline uint16_t mavlink_msg_gopro_set_response_encode_chan(uint8_t system
|
||||
return mavlink_msg_gopro_set_response_pack_chan(system_id, component_id, chan, msg, gopro_set_response->cmd_id, gopro_set_response->status);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a gopro_set_response struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param gopro_set_response C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_gopro_set_response_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_gopro_set_response_t* gopro_set_response)
|
||||
{
|
||||
return mavlink_msg_gopro_set_response_pack_status(system_id, component_id, _status, msg, gopro_set_response->cmd_id, gopro_set_response->status);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a gopro_set_response message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -69,6 +69,42 @@ static inline uint16_t mavlink_msg_hwstatus_pack(uint8_t system_id, uint8_t comp
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_HWSTATUS_MIN_LEN, MAVLINK_MSG_ID_HWSTATUS_LEN, MAVLINK_MSG_ID_HWSTATUS_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a hwstatus message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param Vcc [mV] Board voltage.
|
||||
* @param I2Cerr I2C error count.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hwstatus_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint16_t Vcc, uint8_t I2Cerr)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_HWSTATUS_LEN];
|
||||
_mav_put_uint16_t(buf, 0, Vcc);
|
||||
_mav_put_uint8_t(buf, 2, I2Cerr);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_HWSTATUS_LEN);
|
||||
#else
|
||||
mavlink_hwstatus_t packet;
|
||||
packet.Vcc = Vcc;
|
||||
packet.I2Cerr = I2Cerr;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HWSTATUS_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_HWSTATUS;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_HWSTATUS_MIN_LEN, MAVLINK_MSG_ID_HWSTATUS_LEN, MAVLINK_MSG_ID_HWSTATUS_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_HWSTATUS_MIN_LEN, MAVLINK_MSG_ID_HWSTATUS_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a hwstatus message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -128,6 +164,20 @@ static inline uint16_t mavlink_msg_hwstatus_encode_chan(uint8_t system_id, uint8
|
||||
return mavlink_msg_hwstatus_pack_chan(system_id, component_id, chan, msg, hwstatus->Vcc, hwstatus->I2Cerr);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a hwstatus struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param hwstatus C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_hwstatus_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_hwstatus_t* hwstatus)
|
||||
{
|
||||
return mavlink_msg_hwstatus_pack_status(system_id, component_id, _status, msg, hwstatus->Vcc, hwstatus->I2Cerr);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a hwstatus message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -91,6 +91,52 @@ static inline uint16_t mavlink_msg_led_control_pack(uint8_t system_id, uint8_t c
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LED_CONTROL_MIN_LEN, MAVLINK_MSG_ID_LED_CONTROL_LEN, MAVLINK_MSG_ID_LED_CONTROL_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a led_control message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target_system System ID.
|
||||
* @param target_component Component ID.
|
||||
* @param instance Instance (LED instance to control or 255 for all LEDs).
|
||||
* @param pattern Pattern (see LED_PATTERN_ENUM).
|
||||
* @param custom_len Custom Byte Length.
|
||||
* @param custom_bytes Custom Bytes.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_led_control_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, uint8_t instance, uint8_t pattern, uint8_t custom_len, const uint8_t *custom_bytes)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_LED_CONTROL_LEN];
|
||||
_mav_put_uint8_t(buf, 0, target_system);
|
||||
_mav_put_uint8_t(buf, 1, target_component);
|
||||
_mav_put_uint8_t(buf, 2, instance);
|
||||
_mav_put_uint8_t(buf, 3, pattern);
|
||||
_mav_put_uint8_t(buf, 4, custom_len);
|
||||
_mav_put_uint8_t_array(buf, 5, custom_bytes, 24);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LED_CONTROL_LEN);
|
||||
#else
|
||||
mavlink_led_control_t packet;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
packet.instance = instance;
|
||||
packet.pattern = pattern;
|
||||
packet.custom_len = custom_len;
|
||||
mav_array_memcpy(packet.custom_bytes, custom_bytes, sizeof(uint8_t)*24);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LED_CONTROL_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_LED_CONTROL;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_LED_CONTROL_MIN_LEN, MAVLINK_MSG_ID_LED_CONTROL_LEN, MAVLINK_MSG_ID_LED_CONTROL_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_LED_CONTROL_MIN_LEN, MAVLINK_MSG_ID_LED_CONTROL_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a led_control message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -160,6 +206,20 @@ static inline uint16_t mavlink_msg_led_control_encode_chan(uint8_t system_id, ui
|
||||
return mavlink_msg_led_control_pack_chan(system_id, component_id, chan, msg, led_control->target_system, led_control->target_component, led_control->instance, led_control->pattern, led_control->custom_len, led_control->custom_bytes);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a led_control struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param led_control C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_led_control_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_led_control_t* led_control)
|
||||
{
|
||||
return mavlink_msg_led_control_pack_status(system_id, component_id, _status, msg, led_control->target_system, led_control->target_component, led_control->instance, led_control->pattern, led_control->custom_len, led_control->custom_bytes);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a led_control message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -111,6 +111,63 @@ static inline uint16_t mavlink_msg_limits_status_pack(uint8_t system_id, uint8_t
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LIMITS_STATUS_MIN_LEN, MAVLINK_MSG_ID_LIMITS_STATUS_LEN, MAVLINK_MSG_ID_LIMITS_STATUS_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a limits_status message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param limits_state State of AP_Limits.
|
||||
* @param last_trigger [ms] Time (since boot) of last breach.
|
||||
* @param last_action [ms] Time (since boot) of last recovery action.
|
||||
* @param last_recovery [ms] Time (since boot) of last successful recovery.
|
||||
* @param last_clear [ms] Time (since boot) of last all-clear.
|
||||
* @param breach_count Number of fence breaches.
|
||||
* @param mods_enabled AP_Limit_Module bitfield of enabled modules.
|
||||
* @param mods_required AP_Limit_Module bitfield of required modules.
|
||||
* @param mods_triggered AP_Limit_Module bitfield of triggered modules.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_limits_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t limits_state, uint32_t last_trigger, uint32_t last_action, uint32_t last_recovery, uint32_t last_clear, uint16_t breach_count, uint8_t mods_enabled, uint8_t mods_required, uint8_t mods_triggered)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_LIMITS_STATUS_LEN];
|
||||
_mav_put_uint32_t(buf, 0, last_trigger);
|
||||
_mav_put_uint32_t(buf, 4, last_action);
|
||||
_mav_put_uint32_t(buf, 8, last_recovery);
|
||||
_mav_put_uint32_t(buf, 12, last_clear);
|
||||
_mav_put_uint16_t(buf, 16, breach_count);
|
||||
_mav_put_uint8_t(buf, 18, limits_state);
|
||||
_mav_put_uint8_t(buf, 19, mods_enabled);
|
||||
_mav_put_uint8_t(buf, 20, mods_required);
|
||||
_mav_put_uint8_t(buf, 21, mods_triggered);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LIMITS_STATUS_LEN);
|
||||
#else
|
||||
mavlink_limits_status_t packet;
|
||||
packet.last_trigger = last_trigger;
|
||||
packet.last_action = last_action;
|
||||
packet.last_recovery = last_recovery;
|
||||
packet.last_clear = last_clear;
|
||||
packet.breach_count = breach_count;
|
||||
packet.limits_state = limits_state;
|
||||
packet.mods_enabled = mods_enabled;
|
||||
packet.mods_required = mods_required;
|
||||
packet.mods_triggered = mods_triggered;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LIMITS_STATUS_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_LIMITS_STATUS;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_LIMITS_STATUS_MIN_LEN, MAVLINK_MSG_ID_LIMITS_STATUS_LEN, MAVLINK_MSG_ID_LIMITS_STATUS_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_LIMITS_STATUS_MIN_LEN, MAVLINK_MSG_ID_LIMITS_STATUS_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a limits_status message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -191,6 +248,20 @@ static inline uint16_t mavlink_msg_limits_status_encode_chan(uint8_t system_id,
|
||||
return mavlink_msg_limits_status_pack_chan(system_id, component_id, chan, msg, limits_status->limits_state, limits_status->last_trigger, limits_status->last_action, limits_status->last_recovery, limits_status->last_clear, limits_status->breach_count, limits_status->mods_enabled, limits_status->mods_required, limits_status->mods_triggered);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a limits_status struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param limits_status C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_limits_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_limits_status_t* limits_status)
|
||||
{
|
||||
return mavlink_msg_limits_status_pack_status(system_id, component_id, _status, msg, limits_status->limits_state, limits_status->last_trigger, limits_status->last_action, limits_status->last_recovery, limits_status->last_clear, limits_status->breach_count, limits_status->mods_enabled, limits_status->mods_required, limits_status->mods_triggered);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a limits_status message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -109,6 +109,61 @@ static inline uint16_t mavlink_msg_mag_cal_progress_pack(uint8_t system_id, uint
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_MIN_LEN, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a mag_cal_progress message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param compass_id Compass being calibrated.
|
||||
* @param cal_mask Bitmask of compasses being calibrated.
|
||||
* @param cal_status Calibration Status.
|
||||
* @param attempt Attempt number.
|
||||
* @param completion_pct [%] Completion percentage.
|
||||
* @param completion_mask Bitmask of sphere sections (see http://en.wikipedia.org/wiki/Geodesic_grid).
|
||||
* @param direction_x Body frame direction vector for display.
|
||||
* @param direction_y Body frame direction vector for display.
|
||||
* @param direction_z Body frame direction vector for display.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_mag_cal_progress_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t compass_id, uint8_t cal_mask, uint8_t cal_status, uint8_t attempt, uint8_t completion_pct, const uint8_t *completion_mask, float direction_x, float direction_y, float direction_z)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN];
|
||||
_mav_put_float(buf, 0, direction_x);
|
||||
_mav_put_float(buf, 4, direction_y);
|
||||
_mav_put_float(buf, 8, direction_z);
|
||||
_mav_put_uint8_t(buf, 12, compass_id);
|
||||
_mav_put_uint8_t(buf, 13, cal_mask);
|
||||
_mav_put_uint8_t(buf, 14, cal_status);
|
||||
_mav_put_uint8_t(buf, 15, attempt);
|
||||
_mav_put_uint8_t(buf, 16, completion_pct);
|
||||
_mav_put_uint8_t_array(buf, 17, completion_mask, 10);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN);
|
||||
#else
|
||||
mavlink_mag_cal_progress_t packet;
|
||||
packet.direction_x = direction_x;
|
||||
packet.direction_y = direction_y;
|
||||
packet.direction_z = direction_z;
|
||||
packet.compass_id = compass_id;
|
||||
packet.cal_mask = cal_mask;
|
||||
packet.cal_status = cal_status;
|
||||
packet.attempt = attempt;
|
||||
packet.completion_pct = completion_pct;
|
||||
mav_array_memcpy(packet.completion_mask, completion_mask, sizeof(uint8_t)*10);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_MAG_CAL_PROGRESS;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_MIN_LEN, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_MIN_LEN, MAVLINK_MSG_ID_MAG_CAL_PROGRESS_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a mag_cal_progress message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -187,6 +242,20 @@ static inline uint16_t mavlink_msg_mag_cal_progress_encode_chan(uint8_t system_i
|
||||
return mavlink_msg_mag_cal_progress_pack_chan(system_id, component_id, chan, msg, mag_cal_progress->compass_id, mag_cal_progress->cal_mask, mag_cal_progress->cal_status, mag_cal_progress->attempt, mag_cal_progress->completion_pct, mag_cal_progress->completion_mask, mag_cal_progress->direction_x, mag_cal_progress->direction_y, mag_cal_progress->direction_z);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mag_cal_progress struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param mag_cal_progress C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_mag_cal_progress_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_mag_cal_progress_t* mag_cal_progress)
|
||||
{
|
||||
return mavlink_msg_mag_cal_progress_pack_status(system_id, component_id, _status, msg, mag_cal_progress->compass_id, mag_cal_progress->cal_mask, mag_cal_progress->cal_status, mag_cal_progress->attempt, mag_cal_progress->completion_pct, mag_cal_progress->completion_mask, mag_cal_progress->direction_x, mag_cal_progress->direction_y, mag_cal_progress->direction_z);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a mag_cal_progress message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -87,6 +87,51 @@ static inline uint16_t mavlink_msg_mcu_status_pack(uint8_t system_id, uint8_t co
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MCU_STATUS_MIN_LEN, MAVLINK_MSG_ID_MCU_STATUS_LEN, MAVLINK_MSG_ID_MCU_STATUS_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a mcu_status message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param id MCU instance
|
||||
* @param MCU_temperature [cdegC] MCU Internal temperature
|
||||
* @param MCU_voltage [mV] MCU voltage
|
||||
* @param MCU_voltage_min [mV] MCU voltage minimum
|
||||
* @param MCU_voltage_max [mV] MCU voltage maximum
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_mcu_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t id, int16_t MCU_temperature, uint16_t MCU_voltage, uint16_t MCU_voltage_min, uint16_t MCU_voltage_max)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_MCU_STATUS_LEN];
|
||||
_mav_put_int16_t(buf, 0, MCU_temperature);
|
||||
_mav_put_uint16_t(buf, 2, MCU_voltage);
|
||||
_mav_put_uint16_t(buf, 4, MCU_voltage_min);
|
||||
_mav_put_uint16_t(buf, 6, MCU_voltage_max);
|
||||
_mav_put_uint8_t(buf, 8, id);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MCU_STATUS_LEN);
|
||||
#else
|
||||
mavlink_mcu_status_t packet;
|
||||
packet.MCU_temperature = MCU_temperature;
|
||||
packet.MCU_voltage = MCU_voltage;
|
||||
packet.MCU_voltage_min = MCU_voltage_min;
|
||||
packet.MCU_voltage_max = MCU_voltage_max;
|
||||
packet.id = id;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MCU_STATUS_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_MCU_STATUS;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_MCU_STATUS_MIN_LEN, MAVLINK_MSG_ID_MCU_STATUS_LEN, MAVLINK_MSG_ID_MCU_STATUS_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_MCU_STATUS_MIN_LEN, MAVLINK_MSG_ID_MCU_STATUS_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a mcu_status message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -155,6 +200,20 @@ static inline uint16_t mavlink_msg_mcu_status_encode_chan(uint8_t system_id, uin
|
||||
return mavlink_msg_mcu_status_pack_chan(system_id, component_id, chan, msg, mcu_status->id, mcu_status->MCU_temperature, mcu_status->MCU_voltage, mcu_status->MCU_voltage_min, mcu_status->MCU_voltage_max);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mcu_status struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param mcu_status C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_mcu_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_mcu_status_t* mcu_status)
|
||||
{
|
||||
return mavlink_msg_mcu_status_pack_status(system_id, component_id, _status, msg, mcu_status->id, mcu_status->MCU_temperature, mcu_status->MCU_voltage, mcu_status->MCU_voltage_min, mcu_status->MCU_voltage_max);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a mcu_status message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -75,6 +75,45 @@ static inline uint16_t mavlink_msg_meminfo_pack(uint8_t system_id, uint8_t compo
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MEMINFO_MIN_LEN, MAVLINK_MSG_ID_MEMINFO_LEN, MAVLINK_MSG_ID_MEMINFO_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a meminfo message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param brkval Heap top.
|
||||
* @param freemem [bytes] Free memory.
|
||||
* @param freemem32 [bytes] Free memory (32 bit).
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_meminfo_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint16_t brkval, uint16_t freemem, uint32_t freemem32)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_MEMINFO_LEN];
|
||||
_mav_put_uint16_t(buf, 0, brkval);
|
||||
_mav_put_uint16_t(buf, 2, freemem);
|
||||
_mav_put_uint32_t(buf, 4, freemem32);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MEMINFO_LEN);
|
||||
#else
|
||||
mavlink_meminfo_t packet;
|
||||
packet.brkval = brkval;
|
||||
packet.freemem = freemem;
|
||||
packet.freemem32 = freemem32;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MEMINFO_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_MEMINFO;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_MEMINFO_MIN_LEN, MAVLINK_MSG_ID_MEMINFO_LEN, MAVLINK_MSG_ID_MEMINFO_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_MEMINFO_MIN_LEN, MAVLINK_MSG_ID_MEMINFO_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a meminfo message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -137,6 +176,20 @@ static inline uint16_t mavlink_msg_meminfo_encode_chan(uint8_t system_id, uint8_
|
||||
return mavlink_msg_meminfo_pack_chan(system_id, component_id, chan, msg, meminfo->brkval, meminfo->freemem, meminfo->freemem32);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a meminfo struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param meminfo C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_meminfo_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_meminfo_t* meminfo)
|
||||
{
|
||||
return mavlink_msg_meminfo_pack_status(system_id, component_id, _status, msg, meminfo->brkval, meminfo->freemem, meminfo->freemem32);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a meminfo message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -93,6 +93,54 @@ static inline uint16_t mavlink_msg_mount_configure_pack(uint8_t system_id, uint8
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MOUNT_CONFIGURE_MIN_LEN, MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN, MAVLINK_MSG_ID_MOUNT_CONFIGURE_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a mount_configure message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target_system System ID.
|
||||
* @param target_component Component ID.
|
||||
* @param mount_mode Mount operating mode.
|
||||
* @param stab_roll (1 = yes, 0 = no).
|
||||
* @param stab_pitch (1 = yes, 0 = no).
|
||||
* @param stab_yaw (1 = yes, 0 = no).
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_mount_configure_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, uint8_t mount_mode, uint8_t stab_roll, uint8_t stab_pitch, uint8_t stab_yaw)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN];
|
||||
_mav_put_uint8_t(buf, 0, target_system);
|
||||
_mav_put_uint8_t(buf, 1, target_component);
|
||||
_mav_put_uint8_t(buf, 2, mount_mode);
|
||||
_mav_put_uint8_t(buf, 3, stab_roll);
|
||||
_mav_put_uint8_t(buf, 4, stab_pitch);
|
||||
_mav_put_uint8_t(buf, 5, stab_yaw);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN);
|
||||
#else
|
||||
mavlink_mount_configure_t packet;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
packet.mount_mode = mount_mode;
|
||||
packet.stab_roll = stab_roll;
|
||||
packet.stab_pitch = stab_pitch;
|
||||
packet.stab_yaw = stab_yaw;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_MOUNT_CONFIGURE;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_MOUNT_CONFIGURE_MIN_LEN, MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN, MAVLINK_MSG_ID_MOUNT_CONFIGURE_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_MOUNT_CONFIGURE_MIN_LEN, MAVLINK_MSG_ID_MOUNT_CONFIGURE_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a mount_configure message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -164,6 +212,20 @@ static inline uint16_t mavlink_msg_mount_configure_encode_chan(uint8_t system_id
|
||||
return mavlink_msg_mount_configure_pack_chan(system_id, component_id, chan, msg, mount_configure->target_system, mount_configure->target_component, mount_configure->mount_mode, mount_configure->stab_roll, mount_configure->stab_pitch, mount_configure->stab_yaw);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mount_configure struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param mount_configure C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_mount_configure_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_mount_configure_t* mount_configure)
|
||||
{
|
||||
return mavlink_msg_mount_configure_pack_status(system_id, component_id, _status, msg, mount_configure->target_system, mount_configure->target_component, mount_configure->mount_mode, mount_configure->stab_roll, mount_configure->stab_pitch, mount_configure->stab_yaw);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a mount_configure message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -93,6 +93,54 @@ static inline uint16_t mavlink_msg_mount_control_pack(uint8_t system_id, uint8_t
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MOUNT_CONTROL_MIN_LEN, MAVLINK_MSG_ID_MOUNT_CONTROL_LEN, MAVLINK_MSG_ID_MOUNT_CONTROL_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a mount_control message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target_system System ID.
|
||||
* @param target_component Component ID.
|
||||
* @param input_a Pitch (centi-degrees) or lat (degE7), depending on mount mode.
|
||||
* @param input_b Roll (centi-degrees) or lon (degE7) depending on mount mode.
|
||||
* @param input_c Yaw (centi-degrees) or alt (cm) depending on mount mode.
|
||||
* @param save_position If "1" it will save current trimmed position on EEPROM (just valid for NEUTRAL and LANDING).
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_mount_control_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, int32_t input_a, int32_t input_b, int32_t input_c, uint8_t save_position)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_MOUNT_CONTROL_LEN];
|
||||
_mav_put_int32_t(buf, 0, input_a);
|
||||
_mav_put_int32_t(buf, 4, input_b);
|
||||
_mav_put_int32_t(buf, 8, input_c);
|
||||
_mav_put_uint8_t(buf, 12, target_system);
|
||||
_mav_put_uint8_t(buf, 13, target_component);
|
||||
_mav_put_uint8_t(buf, 14, save_position);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MOUNT_CONTROL_LEN);
|
||||
#else
|
||||
mavlink_mount_control_t packet;
|
||||
packet.input_a = input_a;
|
||||
packet.input_b = input_b;
|
||||
packet.input_c = input_c;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
packet.save_position = save_position;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MOUNT_CONTROL_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_MOUNT_CONTROL;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_MOUNT_CONTROL_MIN_LEN, MAVLINK_MSG_ID_MOUNT_CONTROL_LEN, MAVLINK_MSG_ID_MOUNT_CONTROL_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_MOUNT_CONTROL_MIN_LEN, MAVLINK_MSG_ID_MOUNT_CONTROL_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a mount_control message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -164,6 +212,20 @@ static inline uint16_t mavlink_msg_mount_control_encode_chan(uint8_t system_id,
|
||||
return mavlink_msg_mount_control_pack_chan(system_id, component_id, chan, msg, mount_control->target_system, mount_control->target_component, mount_control->input_a, mount_control->input_b, mount_control->input_c, mount_control->save_position);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mount_control struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param mount_control C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_mount_control_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_mount_control_t* mount_control)
|
||||
{
|
||||
return mavlink_msg_mount_control_pack_status(system_id, component_id, _status, msg, mount_control->target_system, mount_control->target_component, mount_control->input_a, mount_control->input_b, mount_control->input_c, mount_control->save_position);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a mount_control message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -93,6 +93,54 @@ static inline uint16_t mavlink_msg_mount_status_pack(uint8_t system_id, uint8_t
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MOUNT_STATUS_MIN_LEN, MAVLINK_MSG_ID_MOUNT_STATUS_LEN, MAVLINK_MSG_ID_MOUNT_STATUS_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a mount_status message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target_system System ID.
|
||||
* @param target_component Component ID.
|
||||
* @param pointing_a [cdeg] Pitch.
|
||||
* @param pointing_b [cdeg] Roll.
|
||||
* @param pointing_c [cdeg] Yaw.
|
||||
* @param mount_mode Mount operating mode.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_mount_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, int32_t pointing_a, int32_t pointing_b, int32_t pointing_c, uint8_t mount_mode)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_MOUNT_STATUS_LEN];
|
||||
_mav_put_int32_t(buf, 0, pointing_a);
|
||||
_mav_put_int32_t(buf, 4, pointing_b);
|
||||
_mav_put_int32_t(buf, 8, pointing_c);
|
||||
_mav_put_uint8_t(buf, 12, target_system);
|
||||
_mav_put_uint8_t(buf, 13, target_component);
|
||||
_mav_put_uint8_t(buf, 14, mount_mode);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MOUNT_STATUS_LEN);
|
||||
#else
|
||||
mavlink_mount_status_t packet;
|
||||
packet.pointing_a = pointing_a;
|
||||
packet.pointing_b = pointing_b;
|
||||
packet.pointing_c = pointing_c;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
packet.mount_mode = mount_mode;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MOUNT_STATUS_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_MOUNT_STATUS;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_MOUNT_STATUS_MIN_LEN, MAVLINK_MSG_ID_MOUNT_STATUS_LEN, MAVLINK_MSG_ID_MOUNT_STATUS_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_MOUNT_STATUS_MIN_LEN, MAVLINK_MSG_ID_MOUNT_STATUS_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a mount_status message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -164,6 +212,20 @@ static inline uint16_t mavlink_msg_mount_status_encode_chan(uint8_t system_id, u
|
||||
return mavlink_msg_mount_status_pack_chan(system_id, component_id, chan, msg, mount_status->target_system, mount_status->target_component, mount_status->pointing_a, mount_status->pointing_b, mount_status->pointing_c, mount_status->mount_mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a mount_status struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param mount_status C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_mount_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_mount_status_t* mount_status)
|
||||
{
|
||||
return mavlink_msg_mount_status_pack_status(system_id, component_id, _status, msg, mount_status->target_system, mount_status->target_component, mount_status->pointing_a, mount_status->pointing_b, mount_status->pointing_c, mount_status->mount_mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a mount_status message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -111,6 +111,63 @@ static inline uint16_t mavlink_msg_obstacle_distance_3d_pack(uint8_t system_id,
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_3D_MIN_LEN, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_3D_LEN, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_3D_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a obstacle_distance_3d message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param time_boot_ms [ms] Timestamp (time since system boot).
|
||||
* @param sensor_type Class id of the distance sensor type.
|
||||
* @param frame Coordinate frame of reference.
|
||||
* @param obstacle_id Unique ID given to each obstacle so that its movement can be tracked. Use UINT16_MAX if object ID is unknown or cannot be determined.
|
||||
* @param x [m] X position of the obstacle.
|
||||
* @param y [m] Y position of the obstacle.
|
||||
* @param z [m] Z position of the obstacle.
|
||||
* @param min_distance [m] Minimum distance the sensor can measure.
|
||||
* @param max_distance [m] Maximum distance the sensor can measure.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_obstacle_distance_3d_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint32_t time_boot_ms, uint8_t sensor_type, uint8_t frame, uint16_t obstacle_id, float x, float y, float z, float min_distance, float max_distance)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_OBSTACLE_DISTANCE_3D_LEN];
|
||||
_mav_put_uint32_t(buf, 0, time_boot_ms);
|
||||
_mav_put_float(buf, 4, x);
|
||||
_mav_put_float(buf, 8, y);
|
||||
_mav_put_float(buf, 12, z);
|
||||
_mav_put_float(buf, 16, min_distance);
|
||||
_mav_put_float(buf, 20, max_distance);
|
||||
_mav_put_uint16_t(buf, 24, obstacle_id);
|
||||
_mav_put_uint8_t(buf, 26, sensor_type);
|
||||
_mav_put_uint8_t(buf, 27, frame);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_3D_LEN);
|
||||
#else
|
||||
mavlink_obstacle_distance_3d_t packet;
|
||||
packet.time_boot_ms = time_boot_ms;
|
||||
packet.x = x;
|
||||
packet.y = y;
|
||||
packet.z = z;
|
||||
packet.min_distance = min_distance;
|
||||
packet.max_distance = max_distance;
|
||||
packet.obstacle_id = obstacle_id;
|
||||
packet.sensor_type = sensor_type;
|
||||
packet.frame = frame;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_3D_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_OBSTACLE_DISTANCE_3D;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_3D_MIN_LEN, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_3D_LEN, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_3D_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_3D_MIN_LEN, MAVLINK_MSG_ID_OBSTACLE_DISTANCE_3D_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a obstacle_distance_3d message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -191,6 +248,20 @@ static inline uint16_t mavlink_msg_obstacle_distance_3d_encode_chan(uint8_t syst
|
||||
return mavlink_msg_obstacle_distance_3d_pack_chan(system_id, component_id, chan, msg, obstacle_distance_3d->time_boot_ms, obstacle_distance_3d->sensor_type, obstacle_distance_3d->frame, obstacle_distance_3d->obstacle_id, obstacle_distance_3d->x, obstacle_distance_3d->y, obstacle_distance_3d->z, obstacle_distance_3d->min_distance, obstacle_distance_3d->max_distance);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a obstacle_distance_3d struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param obstacle_distance_3d C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_obstacle_distance_3d_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_obstacle_distance_3d_t* obstacle_distance_3d)
|
||||
{
|
||||
return mavlink_msg_obstacle_distance_3d_pack_status(system_id, component_id, _status, msg, obstacle_distance_3d->time_boot_ms, obstacle_distance_3d->sensor_type, obstacle_distance_3d->frame, obstacle_distance_3d->obstacle_id, obstacle_distance_3d->x, obstacle_distance_3d->y, obstacle_distance_3d->z, obstacle_distance_3d->min_distance, obstacle_distance_3d->max_distance);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a obstacle_distance_3d message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -115,6 +115,64 @@ static inline uint16_t mavlink_msg_osd_param_config_pack(uint8_t system_id, uint
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_OSD_PARAM_CONFIG_MIN_LEN, MAVLINK_MSG_ID_OSD_PARAM_CONFIG_LEN, MAVLINK_MSG_ID_OSD_PARAM_CONFIG_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a osd_param_config message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target_system System ID.
|
||||
* @param target_component Component ID.
|
||||
* @param request_id Request ID - copied to reply.
|
||||
* @param osd_screen OSD parameter screen index.
|
||||
* @param osd_index OSD parameter display index.
|
||||
* @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 config_type Config type.
|
||||
* @param min_value OSD parameter minimum value.
|
||||
* @param max_value OSD parameter maximum value.
|
||||
* @param increment OSD parameter increment.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_osd_param_config_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, uint32_t request_id, uint8_t osd_screen, uint8_t osd_index, const char *param_id, uint8_t config_type, float min_value, float max_value, float increment)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_OSD_PARAM_CONFIG_LEN];
|
||||
_mav_put_uint32_t(buf, 0, request_id);
|
||||
_mav_put_float(buf, 4, min_value);
|
||||
_mav_put_float(buf, 8, max_value);
|
||||
_mav_put_float(buf, 12, increment);
|
||||
_mav_put_uint8_t(buf, 16, target_system);
|
||||
_mav_put_uint8_t(buf, 17, target_component);
|
||||
_mav_put_uint8_t(buf, 18, osd_screen);
|
||||
_mav_put_uint8_t(buf, 19, osd_index);
|
||||
_mav_put_uint8_t(buf, 36, config_type);
|
||||
_mav_put_char_array(buf, 20, param_id, 16);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_OSD_PARAM_CONFIG_LEN);
|
||||
#else
|
||||
mavlink_osd_param_config_t packet;
|
||||
packet.request_id = request_id;
|
||||
packet.min_value = min_value;
|
||||
packet.max_value = max_value;
|
||||
packet.increment = increment;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
packet.osd_screen = osd_screen;
|
||||
packet.osd_index = osd_index;
|
||||
packet.config_type = config_type;
|
||||
mav_array_memcpy(packet.param_id, param_id, sizeof(char)*16);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_OSD_PARAM_CONFIG_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_OSD_PARAM_CONFIG;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_OSD_PARAM_CONFIG_MIN_LEN, MAVLINK_MSG_ID_OSD_PARAM_CONFIG_LEN, MAVLINK_MSG_ID_OSD_PARAM_CONFIG_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_OSD_PARAM_CONFIG_MIN_LEN, MAVLINK_MSG_ID_OSD_PARAM_CONFIG_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a osd_param_config message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -196,6 +254,20 @@ static inline uint16_t mavlink_msg_osd_param_config_encode_chan(uint8_t system_i
|
||||
return mavlink_msg_osd_param_config_pack_chan(system_id, component_id, chan, msg, osd_param_config->target_system, osd_param_config->target_component, osd_param_config->request_id, osd_param_config->osd_screen, osd_param_config->osd_index, osd_param_config->param_id, osd_param_config->config_type, osd_param_config->min_value, osd_param_config->max_value, osd_param_config->increment);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a osd_param_config struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param osd_param_config C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_osd_param_config_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_osd_param_config_t* osd_param_config)
|
||||
{
|
||||
return mavlink_msg_osd_param_config_pack_status(system_id, component_id, _status, msg, osd_param_config->target_system, osd_param_config->target_component, osd_param_config->request_id, osd_param_config->osd_screen, osd_param_config->osd_index, osd_param_config->param_id, osd_param_config->config_type, osd_param_config->min_value, osd_param_config->max_value, osd_param_config->increment);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a osd_param_config message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -69,6 +69,42 @@ static inline uint16_t mavlink_msg_osd_param_config_reply_pack(uint8_t system_id
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_OSD_PARAM_CONFIG_REPLY_MIN_LEN, MAVLINK_MSG_ID_OSD_PARAM_CONFIG_REPLY_LEN, MAVLINK_MSG_ID_OSD_PARAM_CONFIG_REPLY_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a osd_param_config_reply message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param request_id Request ID - copied from request.
|
||||
* @param result Config error type.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_osd_param_config_reply_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint32_t request_id, uint8_t result)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_OSD_PARAM_CONFIG_REPLY_LEN];
|
||||
_mav_put_uint32_t(buf, 0, request_id);
|
||||
_mav_put_uint8_t(buf, 4, result);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_OSD_PARAM_CONFIG_REPLY_LEN);
|
||||
#else
|
||||
mavlink_osd_param_config_reply_t packet;
|
||||
packet.request_id = request_id;
|
||||
packet.result = result;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_OSD_PARAM_CONFIG_REPLY_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_OSD_PARAM_CONFIG_REPLY;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_OSD_PARAM_CONFIG_REPLY_MIN_LEN, MAVLINK_MSG_ID_OSD_PARAM_CONFIG_REPLY_LEN, MAVLINK_MSG_ID_OSD_PARAM_CONFIG_REPLY_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_OSD_PARAM_CONFIG_REPLY_MIN_LEN, MAVLINK_MSG_ID_OSD_PARAM_CONFIG_REPLY_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a osd_param_config_reply message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -128,6 +164,20 @@ static inline uint16_t mavlink_msg_osd_param_config_reply_encode_chan(uint8_t sy
|
||||
return mavlink_msg_osd_param_config_reply_pack_chan(system_id, component_id, chan, msg, osd_param_config_reply->request_id, osd_param_config_reply->result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a osd_param_config_reply struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param osd_param_config_reply C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_osd_param_config_reply_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_osd_param_config_reply_t* osd_param_config_reply)
|
||||
{
|
||||
return mavlink_msg_osd_param_config_reply_pack_status(system_id, component_id, _status, msg, osd_param_config_reply->request_id, osd_param_config_reply->result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a osd_param_config_reply message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -87,6 +87,51 @@ static inline uint16_t mavlink_msg_osd_param_show_config_pack(uint8_t system_id,
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_OSD_PARAM_SHOW_CONFIG_MIN_LEN, MAVLINK_MSG_ID_OSD_PARAM_SHOW_CONFIG_LEN, MAVLINK_MSG_ID_OSD_PARAM_SHOW_CONFIG_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a osd_param_show_config message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target_system System ID.
|
||||
* @param target_component Component ID.
|
||||
* @param request_id Request ID - copied to reply.
|
||||
* @param osd_screen OSD parameter screen index.
|
||||
* @param osd_index OSD parameter display index.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_osd_param_show_config_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, uint32_t request_id, uint8_t osd_screen, uint8_t osd_index)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_OSD_PARAM_SHOW_CONFIG_LEN];
|
||||
_mav_put_uint32_t(buf, 0, request_id);
|
||||
_mav_put_uint8_t(buf, 4, target_system);
|
||||
_mav_put_uint8_t(buf, 5, target_component);
|
||||
_mav_put_uint8_t(buf, 6, osd_screen);
|
||||
_mav_put_uint8_t(buf, 7, osd_index);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_OSD_PARAM_SHOW_CONFIG_LEN);
|
||||
#else
|
||||
mavlink_osd_param_show_config_t packet;
|
||||
packet.request_id = request_id;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
packet.osd_screen = osd_screen;
|
||||
packet.osd_index = osd_index;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_OSD_PARAM_SHOW_CONFIG_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_OSD_PARAM_SHOW_CONFIG;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_OSD_PARAM_SHOW_CONFIG_MIN_LEN, MAVLINK_MSG_ID_OSD_PARAM_SHOW_CONFIG_LEN, MAVLINK_MSG_ID_OSD_PARAM_SHOW_CONFIG_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_OSD_PARAM_SHOW_CONFIG_MIN_LEN, MAVLINK_MSG_ID_OSD_PARAM_SHOW_CONFIG_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a osd_param_show_config message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -155,6 +200,20 @@ static inline uint16_t mavlink_msg_osd_param_show_config_encode_chan(uint8_t sys
|
||||
return mavlink_msg_osd_param_show_config_pack_chan(system_id, component_id, chan, msg, osd_param_show_config->target_system, osd_param_show_config->target_component, osd_param_show_config->request_id, osd_param_show_config->osd_screen, osd_param_show_config->osd_index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a osd_param_show_config struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param osd_param_show_config C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_osd_param_show_config_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_osd_param_show_config_t* osd_param_show_config)
|
||||
{
|
||||
return mavlink_msg_osd_param_show_config_pack_status(system_id, component_id, _status, msg, osd_param_show_config->target_system, osd_param_show_config->target_component, osd_param_show_config->request_id, osd_param_show_config->osd_screen, osd_param_show_config->osd_index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a osd_param_show_config message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -97,6 +97,55 @@ static inline uint16_t mavlink_msg_osd_param_show_config_reply_pack(uint8_t syst
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_OSD_PARAM_SHOW_CONFIG_REPLY_MIN_LEN, MAVLINK_MSG_ID_OSD_PARAM_SHOW_CONFIG_REPLY_LEN, MAVLINK_MSG_ID_OSD_PARAM_SHOW_CONFIG_REPLY_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a osd_param_show_config_reply message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param request_id Request ID - copied from request.
|
||||
* @param result Config error type.
|
||||
* @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 config_type Config type.
|
||||
* @param min_value OSD parameter minimum value.
|
||||
* @param max_value OSD parameter maximum value.
|
||||
* @param increment OSD parameter increment.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_osd_param_show_config_reply_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint32_t request_id, uint8_t result, const char *param_id, uint8_t config_type, float min_value, float max_value, float increment)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_OSD_PARAM_SHOW_CONFIG_REPLY_LEN];
|
||||
_mav_put_uint32_t(buf, 0, request_id);
|
||||
_mav_put_float(buf, 4, min_value);
|
||||
_mav_put_float(buf, 8, max_value);
|
||||
_mav_put_float(buf, 12, increment);
|
||||
_mav_put_uint8_t(buf, 16, result);
|
||||
_mav_put_uint8_t(buf, 33, config_type);
|
||||
_mav_put_char_array(buf, 17, param_id, 16);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_OSD_PARAM_SHOW_CONFIG_REPLY_LEN);
|
||||
#else
|
||||
mavlink_osd_param_show_config_reply_t packet;
|
||||
packet.request_id = request_id;
|
||||
packet.min_value = min_value;
|
||||
packet.max_value = max_value;
|
||||
packet.increment = increment;
|
||||
packet.result = result;
|
||||
packet.config_type = config_type;
|
||||
mav_array_memcpy(packet.param_id, param_id, sizeof(char)*16);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_OSD_PARAM_SHOW_CONFIG_REPLY_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_OSD_PARAM_SHOW_CONFIG_REPLY;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_OSD_PARAM_SHOW_CONFIG_REPLY_MIN_LEN, MAVLINK_MSG_ID_OSD_PARAM_SHOW_CONFIG_REPLY_LEN, MAVLINK_MSG_ID_OSD_PARAM_SHOW_CONFIG_REPLY_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_OSD_PARAM_SHOW_CONFIG_REPLY_MIN_LEN, MAVLINK_MSG_ID_OSD_PARAM_SHOW_CONFIG_REPLY_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a osd_param_show_config_reply message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -169,6 +218,20 @@ static inline uint16_t mavlink_msg_osd_param_show_config_reply_encode_chan(uint8
|
||||
return mavlink_msg_osd_param_show_config_reply_pack_chan(system_id, component_id, chan, msg, osd_param_show_config_reply->request_id, osd_param_show_config_reply->result, osd_param_show_config_reply->param_id, osd_param_show_config_reply->config_type, osd_param_show_config_reply->min_value, osd_param_show_config_reply->max_value, osd_param_show_config_reply->increment);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a osd_param_show_config_reply struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param osd_param_show_config_reply C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_osd_param_show_config_reply_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_osd_param_show_config_reply_t* osd_param_show_config_reply)
|
||||
{
|
||||
return mavlink_msg_osd_param_show_config_reply_pack_status(system_id, component_id, _status, msg, osd_param_show_config_reply->request_id, osd_param_show_config_reply->result, osd_param_show_config_reply->param_id, osd_param_show_config_reply->config_type, osd_param_show_config_reply->min_value, osd_param_show_config_reply->max_value, osd_param_show_config_reply->increment);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a osd_param_show_config_reply message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -111,6 +111,63 @@ static inline uint16_t mavlink_msg_pid_tuning_pack(uint8_t system_id, uint8_t co
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_PID_TUNING_MIN_LEN, MAVLINK_MSG_ID_PID_TUNING_LEN, MAVLINK_MSG_ID_PID_TUNING_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a pid_tuning message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param axis Axis.
|
||||
* @param desired Desired rate.
|
||||
* @param achieved Achieved rate.
|
||||
* @param FF FF component.
|
||||
* @param P P component.
|
||||
* @param I I component.
|
||||
* @param D D component.
|
||||
* @param SRate Slew rate.
|
||||
* @param PDmod P/D oscillation modifier.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_pid_tuning_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t axis, float desired, float achieved, float FF, float P, float I, float D, float SRate, float PDmod)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_PID_TUNING_LEN];
|
||||
_mav_put_float(buf, 0, desired);
|
||||
_mav_put_float(buf, 4, achieved);
|
||||
_mav_put_float(buf, 8, FF);
|
||||
_mav_put_float(buf, 12, P);
|
||||
_mav_put_float(buf, 16, I);
|
||||
_mav_put_float(buf, 20, D);
|
||||
_mav_put_uint8_t(buf, 24, axis);
|
||||
_mav_put_float(buf, 25, SRate);
|
||||
_mav_put_float(buf, 29, PDmod);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_PID_TUNING_LEN);
|
||||
#else
|
||||
mavlink_pid_tuning_t packet;
|
||||
packet.desired = desired;
|
||||
packet.achieved = achieved;
|
||||
packet.FF = FF;
|
||||
packet.P = P;
|
||||
packet.I = I;
|
||||
packet.D = D;
|
||||
packet.axis = axis;
|
||||
packet.SRate = SRate;
|
||||
packet.PDmod = PDmod;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_PID_TUNING_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_PID_TUNING;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_PID_TUNING_MIN_LEN, MAVLINK_MSG_ID_PID_TUNING_LEN, MAVLINK_MSG_ID_PID_TUNING_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_PID_TUNING_MIN_LEN, MAVLINK_MSG_ID_PID_TUNING_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a pid_tuning message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -191,6 +248,20 @@ static inline uint16_t mavlink_msg_pid_tuning_encode_chan(uint8_t system_id, uin
|
||||
return mavlink_msg_pid_tuning_pack_chan(system_id, component_id, chan, msg, pid_tuning->axis, pid_tuning->desired, pid_tuning->achieved, pid_tuning->FF, pid_tuning->P, pid_tuning->I, pid_tuning->D, pid_tuning->SRate, pid_tuning->PDmod);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a pid_tuning struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param pid_tuning C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_pid_tuning_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_pid_tuning_t* pid_tuning)
|
||||
{
|
||||
return mavlink_msg_pid_tuning_pack_status(system_id, component_id, _status, msg, pid_tuning->axis, pid_tuning->desired, pid_tuning->achieved, pid_tuning->FF, pid_tuning->P, pid_tuning->I, pid_tuning->D, pid_tuning->SRate, pid_tuning->PDmod);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a pid_tuning message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -99,6 +99,57 @@ static inline uint16_t mavlink_msg_radio_pack(uint8_t system_id, uint8_t compone
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RADIO_MIN_LEN, MAVLINK_MSG_ID_RADIO_LEN, MAVLINK_MSG_ID_RADIO_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a radio message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param rssi Local signal strength.
|
||||
* @param remrssi Remote signal strength.
|
||||
* @param txbuf [%] How full the tx buffer is.
|
||||
* @param noise Background noise level.
|
||||
* @param remnoise Remote background noise level.
|
||||
* @param rxerrors Receive errors.
|
||||
* @param fixed Count of error corrected packets.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_radio_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t rssi, uint8_t remrssi, uint8_t txbuf, uint8_t noise, uint8_t remnoise, uint16_t rxerrors, uint16_t fixed)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_RADIO_LEN];
|
||||
_mav_put_uint16_t(buf, 0, rxerrors);
|
||||
_mav_put_uint16_t(buf, 2, fixed);
|
||||
_mav_put_uint8_t(buf, 4, rssi);
|
||||
_mav_put_uint8_t(buf, 5, remrssi);
|
||||
_mav_put_uint8_t(buf, 6, txbuf);
|
||||
_mav_put_uint8_t(buf, 7, noise);
|
||||
_mav_put_uint8_t(buf, 8, remnoise);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RADIO_LEN);
|
||||
#else
|
||||
mavlink_radio_t packet;
|
||||
packet.rxerrors = rxerrors;
|
||||
packet.fixed = fixed;
|
||||
packet.rssi = rssi;
|
||||
packet.remrssi = remrssi;
|
||||
packet.txbuf = txbuf;
|
||||
packet.noise = noise;
|
||||
packet.remnoise = remnoise;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RADIO_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_RADIO;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_RADIO_MIN_LEN, MAVLINK_MSG_ID_RADIO_LEN, MAVLINK_MSG_ID_RADIO_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_RADIO_MIN_LEN, MAVLINK_MSG_ID_RADIO_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a radio message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -173,6 +224,20 @@ static inline uint16_t mavlink_msg_radio_encode_chan(uint8_t system_id, uint8_t
|
||||
return mavlink_msg_radio_pack_chan(system_id, component_id, chan, msg, radio->rssi, radio->remrssi, radio->txbuf, radio->noise, radio->remnoise, radio->rxerrors, radio->fixed);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a radio struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param radio C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_radio_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_radio_t* radio)
|
||||
{
|
||||
return mavlink_msg_radio_pack_status(system_id, component_id, _status, msg, radio->rssi, radio->remrssi, radio->txbuf, radio->noise, radio->remnoise, radio->rxerrors, radio->fixed);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a radio message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -75,6 +75,45 @@ static inline uint16_t mavlink_msg_rally_fetch_point_pack(uint8_t system_id, uin
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RALLY_FETCH_POINT_MIN_LEN, MAVLINK_MSG_ID_RALLY_FETCH_POINT_LEN, MAVLINK_MSG_ID_RALLY_FETCH_POINT_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a rally_fetch_point message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target_system System ID.
|
||||
* @param target_component Component ID.
|
||||
* @param idx Point index (first point is 0).
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_rally_fetch_point_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, uint8_t idx)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_RALLY_FETCH_POINT_LEN];
|
||||
_mav_put_uint8_t(buf, 0, target_system);
|
||||
_mav_put_uint8_t(buf, 1, target_component);
|
||||
_mav_put_uint8_t(buf, 2, idx);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RALLY_FETCH_POINT_LEN);
|
||||
#else
|
||||
mavlink_rally_fetch_point_t packet;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
packet.idx = idx;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RALLY_FETCH_POINT_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_RALLY_FETCH_POINT;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_RALLY_FETCH_POINT_MIN_LEN, MAVLINK_MSG_ID_RALLY_FETCH_POINT_LEN, MAVLINK_MSG_ID_RALLY_FETCH_POINT_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_RALLY_FETCH_POINT_MIN_LEN, MAVLINK_MSG_ID_RALLY_FETCH_POINT_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a rally_fetch_point message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -137,6 +176,20 @@ static inline uint16_t mavlink_msg_rally_fetch_point_encode_chan(uint8_t system_
|
||||
return mavlink_msg_rally_fetch_point_pack_chan(system_id, component_id, chan, msg, rally_fetch_point->target_system, rally_fetch_point->target_component, rally_fetch_point->idx);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a rally_fetch_point struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param rally_fetch_point C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_rally_fetch_point_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_rally_fetch_point_t* rally_fetch_point)
|
||||
{
|
||||
return mavlink_msg_rally_fetch_point_pack_status(system_id, component_id, _status, msg, rally_fetch_point->target_system, rally_fetch_point->target_component, rally_fetch_point->idx);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a rally_fetch_point message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -117,6 +117,66 @@ static inline uint16_t mavlink_msg_rally_point_pack(uint8_t system_id, uint8_t c
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RALLY_POINT_MIN_LEN, MAVLINK_MSG_ID_RALLY_POINT_LEN, MAVLINK_MSG_ID_RALLY_POINT_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a rally_point message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target_system System ID.
|
||||
* @param target_component Component ID.
|
||||
* @param idx Point index (first point is 0).
|
||||
* @param count Total number of points (for sanity checking).
|
||||
* @param lat [degE7] Latitude of point.
|
||||
* @param lng [degE7] Longitude of point.
|
||||
* @param alt [m] Transit / loiter altitude relative to home.
|
||||
* @param break_alt [m] Break altitude relative to home.
|
||||
* @param land_dir [cdeg] Heading to aim for when landing.
|
||||
* @param flags Configuration flags.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_rally_point_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, uint8_t idx, uint8_t count, int32_t lat, int32_t lng, int16_t alt, int16_t break_alt, uint16_t land_dir, uint8_t flags)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_RALLY_POINT_LEN];
|
||||
_mav_put_int32_t(buf, 0, lat);
|
||||
_mav_put_int32_t(buf, 4, lng);
|
||||
_mav_put_int16_t(buf, 8, alt);
|
||||
_mav_put_int16_t(buf, 10, break_alt);
|
||||
_mav_put_uint16_t(buf, 12, land_dir);
|
||||
_mav_put_uint8_t(buf, 14, target_system);
|
||||
_mav_put_uint8_t(buf, 15, target_component);
|
||||
_mav_put_uint8_t(buf, 16, idx);
|
||||
_mav_put_uint8_t(buf, 17, count);
|
||||
_mav_put_uint8_t(buf, 18, flags);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RALLY_POINT_LEN);
|
||||
#else
|
||||
mavlink_rally_point_t packet;
|
||||
packet.lat = lat;
|
||||
packet.lng = lng;
|
||||
packet.alt = alt;
|
||||
packet.break_alt = break_alt;
|
||||
packet.land_dir = land_dir;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
packet.idx = idx;
|
||||
packet.count = count;
|
||||
packet.flags = flags;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RALLY_POINT_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_RALLY_POINT;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_RALLY_POINT_MIN_LEN, MAVLINK_MSG_ID_RALLY_POINT_LEN, MAVLINK_MSG_ID_RALLY_POINT_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_RALLY_POINT_MIN_LEN, MAVLINK_MSG_ID_RALLY_POINT_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a rally_point message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -200,6 +260,20 @@ static inline uint16_t mavlink_msg_rally_point_encode_chan(uint8_t system_id, ui
|
||||
return mavlink_msg_rally_point_pack_chan(system_id, component_id, chan, msg, rally_point->target_system, rally_point->target_component, rally_point->idx, rally_point->count, rally_point->lat, rally_point->lng, rally_point->alt, rally_point->break_alt, rally_point->land_dir, rally_point->flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a rally_point struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param rally_point C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_rally_point_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_rally_point_t* rally_point)
|
||||
{
|
||||
return mavlink_msg_rally_point_pack_status(system_id, component_id, _status, msg, rally_point->target_system, rally_point->target_component, rally_point->idx, rally_point->count, rally_point->lat, rally_point->lng, rally_point->alt, rally_point->break_alt, rally_point->land_dir, rally_point->flags);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a rally_point message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -69,6 +69,42 @@ static inline uint16_t mavlink_msg_rangefinder_pack(uint8_t system_id, uint8_t c
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RANGEFINDER_MIN_LEN, MAVLINK_MSG_ID_RANGEFINDER_LEN, MAVLINK_MSG_ID_RANGEFINDER_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a rangefinder message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param distance [m] Distance.
|
||||
* @param voltage [V] Raw voltage if available, zero otherwise.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_rangefinder_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
float distance, float voltage)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_RANGEFINDER_LEN];
|
||||
_mav_put_float(buf, 0, distance);
|
||||
_mav_put_float(buf, 4, voltage);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RANGEFINDER_LEN);
|
||||
#else
|
||||
mavlink_rangefinder_t packet;
|
||||
packet.distance = distance;
|
||||
packet.voltage = voltage;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RANGEFINDER_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_RANGEFINDER;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_RANGEFINDER_MIN_LEN, MAVLINK_MSG_ID_RANGEFINDER_LEN, MAVLINK_MSG_ID_RANGEFINDER_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_RANGEFINDER_MIN_LEN, MAVLINK_MSG_ID_RANGEFINDER_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a rangefinder message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -128,6 +164,20 @@ static inline uint16_t mavlink_msg_rangefinder_encode_chan(uint8_t system_id, ui
|
||||
return mavlink_msg_rangefinder_pack_chan(system_id, component_id, chan, msg, rangefinder->distance, rangefinder->voltage);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a rangefinder struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param rangefinder C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_rangefinder_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_rangefinder_t* rangefinder)
|
||||
{
|
||||
return mavlink_msg_rangefinder_pack_status(system_id, component_id, _status, msg, rangefinder->distance, rangefinder->voltage);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a rangefinder message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -81,6 +81,48 @@ static inline uint16_t mavlink_msg_remote_log_block_status_pack(uint8_t system_i
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_MIN_LEN, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_LEN, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a remote_log_block_status message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target_system System ID.
|
||||
* @param target_component Component ID.
|
||||
* @param seqno Log data block sequence number.
|
||||
* @param status Log data block status.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_remote_log_block_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, uint32_t seqno, uint8_t status)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_LEN];
|
||||
_mav_put_uint32_t(buf, 0, seqno);
|
||||
_mav_put_uint8_t(buf, 4, target_system);
|
||||
_mav_put_uint8_t(buf, 5, target_component);
|
||||
_mav_put_uint8_t(buf, 6, status);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_LEN);
|
||||
#else
|
||||
mavlink_remote_log_block_status_t packet;
|
||||
packet.seqno = seqno;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
packet.status = status;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_MIN_LEN, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_LEN, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_MIN_LEN, MAVLINK_MSG_ID_REMOTE_LOG_BLOCK_STATUS_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a remote_log_block_status message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -146,6 +188,20 @@ static inline uint16_t mavlink_msg_remote_log_block_status_encode_chan(uint8_t s
|
||||
return mavlink_msg_remote_log_block_status_pack_chan(system_id, component_id, chan, msg, remote_log_block_status->target_system, remote_log_block_status->target_component, remote_log_block_status->seqno, remote_log_block_status->status);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a remote_log_block_status struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param remote_log_block_status C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_remote_log_block_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_remote_log_block_status_t* remote_log_block_status)
|
||||
{
|
||||
return mavlink_msg_remote_log_block_status_pack_status(system_id, component_id, _status, msg, remote_log_block_status->target_system, remote_log_block_status->target_component, remote_log_block_status->seqno, remote_log_block_status->status);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a remote_log_block_status message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -79,6 +79,46 @@ static inline uint16_t mavlink_msg_remote_log_data_block_pack(uint8_t system_id,
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_MIN_LEN, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_LEN, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a remote_log_data_block message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target_system System ID.
|
||||
* @param target_component Component ID.
|
||||
* @param seqno Log data block sequence number.
|
||||
* @param data Log data block.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_remote_log_data_block_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, uint32_t seqno, const uint8_t *data)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_LEN];
|
||||
_mav_put_uint32_t(buf, 0, seqno);
|
||||
_mav_put_uint8_t(buf, 4, target_system);
|
||||
_mav_put_uint8_t(buf, 5, target_component);
|
||||
_mav_put_uint8_t_array(buf, 6, data, 200);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_LEN);
|
||||
#else
|
||||
mavlink_remote_log_data_block_t packet;
|
||||
packet.seqno = seqno;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*200);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_MIN_LEN, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_LEN, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_MIN_LEN, MAVLINK_MSG_ID_REMOTE_LOG_DATA_BLOCK_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a remote_log_data_block message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -142,6 +182,20 @@ static inline uint16_t mavlink_msg_remote_log_data_block_encode_chan(uint8_t sys
|
||||
return mavlink_msg_remote_log_data_block_pack_chan(system_id, component_id, chan, msg, remote_log_data_block->target_system, remote_log_data_block->target_component, remote_log_data_block->seqno, remote_log_data_block->data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a remote_log_data_block struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param remote_log_data_block C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_remote_log_data_block_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_remote_log_data_block_t* remote_log_data_block)
|
||||
{
|
||||
return mavlink_msg_remote_log_data_block_pack_status(system_id, component_id, _status, msg, remote_log_data_block->target_system, remote_log_data_block->target_component, remote_log_data_block->seqno, remote_log_data_block->data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a remote_log_data_block message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -69,6 +69,42 @@ static inline uint16_t mavlink_msg_rpm_pack(uint8_t system_id, uint8_t component
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_RPM_MIN_LEN, MAVLINK_MSG_ID_RPM_LEN, MAVLINK_MSG_ID_RPM_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a rpm message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param rpm1 RPM Sensor1.
|
||||
* @param rpm2 RPM Sensor2.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_rpm_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
float rpm1, float rpm2)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_RPM_LEN];
|
||||
_mav_put_float(buf, 0, rpm1);
|
||||
_mav_put_float(buf, 4, rpm2);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_RPM_LEN);
|
||||
#else
|
||||
mavlink_rpm_t packet;
|
||||
packet.rpm1 = rpm1;
|
||||
packet.rpm2 = rpm2;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_RPM_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_RPM;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_RPM_MIN_LEN, MAVLINK_MSG_ID_RPM_LEN, MAVLINK_MSG_ID_RPM_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_RPM_MIN_LEN, MAVLINK_MSG_ID_RPM_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a rpm message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -128,6 +164,20 @@ static inline uint16_t mavlink_msg_rpm_encode_chan(uint8_t system_id, uint8_t co
|
||||
return mavlink_msg_rpm_pack_chan(system_id, component_id, chan, msg, rpm->rpm1, rpm->rpm2);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a rpm struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param rpm C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_rpm_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_rpm_t* rpm)
|
||||
{
|
||||
return mavlink_msg_rpm_pack_status(system_id, component_id, _status, msg, rpm->rpm1, rpm->rpm2);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a rpm message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -129,6 +129,72 @@ static inline uint16_t mavlink_msg_sensor_offsets_pack(uint8_t system_id, uint8_
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SENSOR_OFFSETS_MIN_LEN, MAVLINK_MSG_ID_SENSOR_OFFSETS_LEN, MAVLINK_MSG_ID_SENSOR_OFFSETS_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a sensor_offsets message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param mag_ofs_x Magnetometer X offset.
|
||||
* @param mag_ofs_y Magnetometer Y offset.
|
||||
* @param mag_ofs_z Magnetometer Z offset.
|
||||
* @param mag_declination [rad] Magnetic declination.
|
||||
* @param raw_press Raw pressure from barometer.
|
||||
* @param raw_temp Raw temperature from barometer.
|
||||
* @param gyro_cal_x Gyro X calibration.
|
||||
* @param gyro_cal_y Gyro Y calibration.
|
||||
* @param gyro_cal_z Gyro Z calibration.
|
||||
* @param accel_cal_x Accel X calibration.
|
||||
* @param accel_cal_y Accel Y calibration.
|
||||
* @param accel_cal_z Accel Z calibration.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_sensor_offsets_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
int16_t mag_ofs_x, int16_t mag_ofs_y, int16_t mag_ofs_z, float mag_declination, int32_t raw_press, int32_t raw_temp, float gyro_cal_x, float gyro_cal_y, float gyro_cal_z, float accel_cal_x, float accel_cal_y, float accel_cal_z)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_SENSOR_OFFSETS_LEN];
|
||||
_mav_put_float(buf, 0, mag_declination);
|
||||
_mav_put_int32_t(buf, 4, raw_press);
|
||||
_mav_put_int32_t(buf, 8, raw_temp);
|
||||
_mav_put_float(buf, 12, gyro_cal_x);
|
||||
_mav_put_float(buf, 16, gyro_cal_y);
|
||||
_mav_put_float(buf, 20, gyro_cal_z);
|
||||
_mav_put_float(buf, 24, accel_cal_x);
|
||||
_mav_put_float(buf, 28, accel_cal_y);
|
||||
_mav_put_float(buf, 32, accel_cal_z);
|
||||
_mav_put_int16_t(buf, 36, mag_ofs_x);
|
||||
_mav_put_int16_t(buf, 38, mag_ofs_y);
|
||||
_mav_put_int16_t(buf, 40, mag_ofs_z);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SENSOR_OFFSETS_LEN);
|
||||
#else
|
||||
mavlink_sensor_offsets_t packet;
|
||||
packet.mag_declination = mag_declination;
|
||||
packet.raw_press = raw_press;
|
||||
packet.raw_temp = raw_temp;
|
||||
packet.gyro_cal_x = gyro_cal_x;
|
||||
packet.gyro_cal_y = gyro_cal_y;
|
||||
packet.gyro_cal_z = gyro_cal_z;
|
||||
packet.accel_cal_x = accel_cal_x;
|
||||
packet.accel_cal_y = accel_cal_y;
|
||||
packet.accel_cal_z = accel_cal_z;
|
||||
packet.mag_ofs_x = mag_ofs_x;
|
||||
packet.mag_ofs_y = mag_ofs_y;
|
||||
packet.mag_ofs_z = mag_ofs_z;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SENSOR_OFFSETS_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_SENSOR_OFFSETS;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SENSOR_OFFSETS_MIN_LEN, MAVLINK_MSG_ID_SENSOR_OFFSETS_LEN, MAVLINK_MSG_ID_SENSOR_OFFSETS_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SENSOR_OFFSETS_MIN_LEN, MAVLINK_MSG_ID_SENSOR_OFFSETS_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a sensor_offsets message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -218,6 +284,20 @@ static inline uint16_t mavlink_msg_sensor_offsets_encode_chan(uint8_t system_id,
|
||||
return mavlink_msg_sensor_offsets_pack_chan(system_id, component_id, chan, msg, sensor_offsets->mag_ofs_x, sensor_offsets->mag_ofs_y, sensor_offsets->mag_ofs_z, sensor_offsets->mag_declination, sensor_offsets->raw_press, sensor_offsets->raw_temp, sensor_offsets->gyro_cal_x, sensor_offsets->gyro_cal_y, sensor_offsets->gyro_cal_z, sensor_offsets->accel_cal_x, sensor_offsets->accel_cal_y, sensor_offsets->accel_cal_z);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a sensor_offsets struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param sensor_offsets C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_sensor_offsets_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_sensor_offsets_t* sensor_offsets)
|
||||
{
|
||||
return mavlink_msg_sensor_offsets_pack_status(system_id, component_id, _status, msg, sensor_offsets->mag_ofs_x, sensor_offsets->mag_ofs_y, sensor_offsets->mag_ofs_z, sensor_offsets->mag_declination, sensor_offsets->raw_press, sensor_offsets->raw_temp, sensor_offsets->gyro_cal_x, sensor_offsets->gyro_cal_y, sensor_offsets->gyro_cal_z, sensor_offsets->accel_cal_x, sensor_offsets->accel_cal_y, sensor_offsets->accel_cal_z);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a sensor_offsets message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -87,6 +87,51 @@ static inline uint16_t mavlink_msg_set_mag_offsets_pack(uint8_t system_id, uint8
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SET_MAG_OFFSETS_MIN_LEN, MAVLINK_MSG_ID_SET_MAG_OFFSETS_LEN, MAVLINK_MSG_ID_SET_MAG_OFFSETS_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a set_mag_offsets message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param target_system System ID.
|
||||
* @param target_component Component ID.
|
||||
* @param mag_ofs_x Magnetometer X offset.
|
||||
* @param mag_ofs_y Magnetometer Y offset.
|
||||
* @param mag_ofs_z Magnetometer Z offset.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_set_mag_offsets_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint8_t target_system, uint8_t target_component, int16_t mag_ofs_x, int16_t mag_ofs_y, int16_t mag_ofs_z)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_SET_MAG_OFFSETS_LEN];
|
||||
_mav_put_int16_t(buf, 0, mag_ofs_x);
|
||||
_mav_put_int16_t(buf, 2, mag_ofs_y);
|
||||
_mav_put_int16_t(buf, 4, mag_ofs_z);
|
||||
_mav_put_uint8_t(buf, 6, target_system);
|
||||
_mav_put_uint8_t(buf, 7, target_component);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SET_MAG_OFFSETS_LEN);
|
||||
#else
|
||||
mavlink_set_mag_offsets_t packet;
|
||||
packet.mag_ofs_x = mag_ofs_x;
|
||||
packet.mag_ofs_y = mag_ofs_y;
|
||||
packet.mag_ofs_z = mag_ofs_z;
|
||||
packet.target_system = target_system;
|
||||
packet.target_component = target_component;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SET_MAG_OFFSETS_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_SET_MAG_OFFSETS;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SET_MAG_OFFSETS_MIN_LEN, MAVLINK_MSG_ID_SET_MAG_OFFSETS_LEN, MAVLINK_MSG_ID_SET_MAG_OFFSETS_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SET_MAG_OFFSETS_MIN_LEN, MAVLINK_MSG_ID_SET_MAG_OFFSETS_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a set_mag_offsets message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -155,6 +200,20 @@ static inline uint16_t mavlink_msg_set_mag_offsets_encode_chan(uint8_t system_id
|
||||
return mavlink_msg_set_mag_offsets_pack_chan(system_id, component_id, chan, msg, set_mag_offsets->target_system, set_mag_offsets->target_component, set_mag_offsets->mag_ofs_x, set_mag_offsets->mag_ofs_y, set_mag_offsets->mag_ofs_z);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a set_mag_offsets struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param set_mag_offsets C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_set_mag_offsets_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_set_mag_offsets_t* set_mag_offsets)
|
||||
{
|
||||
return mavlink_msg_set_mag_offsets_pack_status(system_id, component_id, _status, msg, set_mag_offsets->target_system, set_mag_offsets->target_component, set_mag_offsets->mag_ofs_x, set_mag_offsets->mag_ofs_y, set_mag_offsets->mag_ofs_z);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a set_mag_offsets message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -123,6 +123,69 @@ static inline uint16_t mavlink_msg_simstate_pack(uint8_t system_id, uint8_t comp
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SIMSTATE_MIN_LEN, MAVLINK_MSG_ID_SIMSTATE_LEN, MAVLINK_MSG_ID_SIMSTATE_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a simstate message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param roll [rad] Roll angle.
|
||||
* @param pitch [rad] Pitch angle.
|
||||
* @param yaw [rad] Yaw angle.
|
||||
* @param xacc [m/s/s] X acceleration.
|
||||
* @param yacc [m/s/s] Y acceleration.
|
||||
* @param zacc [m/s/s] Z acceleration.
|
||||
* @param xgyro [rad/s] Angular speed around X axis.
|
||||
* @param ygyro [rad/s] Angular speed around Y axis.
|
||||
* @param zgyro [rad/s] Angular speed around Z axis.
|
||||
* @param lat [degE7] Latitude.
|
||||
* @param lng [degE7] Longitude.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_simstate_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
float roll, float pitch, float yaw, float xacc, float yacc, float zacc, float xgyro, float ygyro, float zgyro, int32_t lat, int32_t lng)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_SIMSTATE_LEN];
|
||||
_mav_put_float(buf, 0, roll);
|
||||
_mav_put_float(buf, 4, pitch);
|
||||
_mav_put_float(buf, 8, yaw);
|
||||
_mav_put_float(buf, 12, xacc);
|
||||
_mav_put_float(buf, 16, yacc);
|
||||
_mav_put_float(buf, 20, zacc);
|
||||
_mav_put_float(buf, 24, xgyro);
|
||||
_mav_put_float(buf, 28, ygyro);
|
||||
_mav_put_float(buf, 32, zgyro);
|
||||
_mav_put_int32_t(buf, 36, lat);
|
||||
_mav_put_int32_t(buf, 40, lng);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SIMSTATE_LEN);
|
||||
#else
|
||||
mavlink_simstate_t packet;
|
||||
packet.roll = roll;
|
||||
packet.pitch = pitch;
|
||||
packet.yaw = yaw;
|
||||
packet.xacc = xacc;
|
||||
packet.yacc = yacc;
|
||||
packet.zacc = zacc;
|
||||
packet.xgyro = xgyro;
|
||||
packet.ygyro = ygyro;
|
||||
packet.zgyro = zgyro;
|
||||
packet.lat = lat;
|
||||
packet.lng = lng;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SIMSTATE_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_SIMSTATE;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SIMSTATE_MIN_LEN, MAVLINK_MSG_ID_SIMSTATE_LEN, MAVLINK_MSG_ID_SIMSTATE_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SIMSTATE_MIN_LEN, MAVLINK_MSG_ID_SIMSTATE_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a simstate message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -209,6 +272,20 @@ static inline uint16_t mavlink_msg_simstate_encode_chan(uint8_t system_id, uint8
|
||||
return mavlink_msg_simstate_pack_chan(system_id, component_id, chan, msg, simstate->roll, simstate->pitch, simstate->yaw, simstate->xacc, simstate->yacc, simstate->zacc, simstate->xgyro, simstate->ygyro, simstate->zgyro, simstate->lat, simstate->lng);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a simstate struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param simstate C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_simstate_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_simstate_t* simstate)
|
||||
{
|
||||
return mavlink_msg_simstate_pack_status(system_id, component_id, _status, msg, simstate->roll, simstate->pitch, simstate->yaw, simstate->xacc, simstate->yacc, simstate->zacc, simstate->xgyro, simstate->ygyro, simstate->zgyro, simstate->lat, simstate->lng);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a simstate message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -86,6 +86,49 @@ static inline uint16_t mavlink_msg_vision_position_delta_pack(uint8_t system_id,
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_VISION_POSITION_DELTA_MIN_LEN, MAVLINK_MSG_ID_VISION_POSITION_DELTA_LEN, MAVLINK_MSG_ID_VISION_POSITION_DELTA_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a vision_position_delta message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param time_usec [us] Timestamp (synced to UNIX time or since system boot).
|
||||
* @param time_delta_usec [us] Time since the last reported camera frame.
|
||||
* @param angle_delta [rad] Defines a rotation vector [roll, pitch, yaw] to the current MAV_FRAME_BODY_FRD from the previous MAV_FRAME_BODY_FRD.
|
||||
* @param position_delta [m] Change in position to the current MAV_FRAME_BODY_FRD from the previous FRAME_BODY_FRD rotated to the current MAV_FRAME_BODY_FRD.
|
||||
* @param confidence [%] Normalised confidence value from 0 to 100.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_vision_position_delta_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint64_t time_usec, uint64_t time_delta_usec, const float *angle_delta, const float *position_delta, float confidence)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_VISION_POSITION_DELTA_LEN];
|
||||
_mav_put_uint64_t(buf, 0, time_usec);
|
||||
_mav_put_uint64_t(buf, 8, time_delta_usec);
|
||||
_mav_put_float(buf, 40, confidence);
|
||||
_mav_put_float_array(buf, 16, angle_delta, 3);
|
||||
_mav_put_float_array(buf, 28, position_delta, 3);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VISION_POSITION_DELTA_LEN);
|
||||
#else
|
||||
mavlink_vision_position_delta_t packet;
|
||||
packet.time_usec = time_usec;
|
||||
packet.time_delta_usec = time_delta_usec;
|
||||
packet.confidence = confidence;
|
||||
mav_array_memcpy(packet.angle_delta, angle_delta, sizeof(float)*3);
|
||||
mav_array_memcpy(packet.position_delta, position_delta, sizeof(float)*3);
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VISION_POSITION_DELTA_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_VISION_POSITION_DELTA;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_VISION_POSITION_DELTA_MIN_LEN, MAVLINK_MSG_ID_VISION_POSITION_DELTA_LEN, MAVLINK_MSG_ID_VISION_POSITION_DELTA_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_VISION_POSITION_DELTA_MIN_LEN, MAVLINK_MSG_ID_VISION_POSITION_DELTA_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a vision_position_delta message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -152,6 +195,20 @@ static inline uint16_t mavlink_msg_vision_position_delta_encode_chan(uint8_t sys
|
||||
return mavlink_msg_vision_position_delta_pack_chan(system_id, component_id, chan, msg, vision_position_delta->time_usec, vision_position_delta->time_delta_usec, vision_position_delta->angle_delta, vision_position_delta->position_delta, vision_position_delta->confidence);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a vision_position_delta struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param vision_position_delta C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_vision_position_delta_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_vision_position_delta_t* vision_position_delta)
|
||||
{
|
||||
return mavlink_msg_vision_position_delta_pack_status(system_id, component_id, _status, msg, vision_position_delta->time_usec, vision_position_delta->time_delta_usec, vision_position_delta->angle_delta, vision_position_delta->position_delta, vision_position_delta->confidence);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a vision_position_delta message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -123,6 +123,69 @@ static inline uint16_t mavlink_msg_water_depth_pack(uint8_t system_id, uint8_t c
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_WATER_DEPTH_MIN_LEN, MAVLINK_MSG_ID_WATER_DEPTH_LEN, MAVLINK_MSG_ID_WATER_DEPTH_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a water_depth message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param time_boot_ms [ms] Timestamp (time since system boot)
|
||||
* @param id Onboard ID of the sensor
|
||||
* @param healthy Sensor data healthy (0=unhealthy, 1=healthy)
|
||||
* @param lat [degE7] Latitude
|
||||
* @param lng [degE7] Longitude
|
||||
* @param alt [m] Altitude (MSL) of vehicle
|
||||
* @param roll [rad] Roll angle
|
||||
* @param pitch [rad] Pitch angle
|
||||
* @param yaw [rad] Yaw angle
|
||||
* @param distance [m] Distance (uncorrected)
|
||||
* @param temperature [degC] Water temperature
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_water_depth_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
uint32_t time_boot_ms, uint8_t id, uint8_t healthy, int32_t lat, int32_t lng, float alt, float roll, float pitch, float yaw, float distance, float temperature)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_WATER_DEPTH_LEN];
|
||||
_mav_put_uint32_t(buf, 0, time_boot_ms);
|
||||
_mav_put_int32_t(buf, 4, lat);
|
||||
_mav_put_int32_t(buf, 8, lng);
|
||||
_mav_put_float(buf, 12, alt);
|
||||
_mav_put_float(buf, 16, roll);
|
||||
_mav_put_float(buf, 20, pitch);
|
||||
_mav_put_float(buf, 24, yaw);
|
||||
_mav_put_float(buf, 28, distance);
|
||||
_mav_put_float(buf, 32, temperature);
|
||||
_mav_put_uint8_t(buf, 36, id);
|
||||
_mav_put_uint8_t(buf, 37, healthy);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_WATER_DEPTH_LEN);
|
||||
#else
|
||||
mavlink_water_depth_t packet;
|
||||
packet.time_boot_ms = time_boot_ms;
|
||||
packet.lat = lat;
|
||||
packet.lng = lng;
|
||||
packet.alt = alt;
|
||||
packet.roll = roll;
|
||||
packet.pitch = pitch;
|
||||
packet.yaw = yaw;
|
||||
packet.distance = distance;
|
||||
packet.temperature = temperature;
|
||||
packet.id = id;
|
||||
packet.healthy = healthy;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_WATER_DEPTH_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_WATER_DEPTH;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_WATER_DEPTH_MIN_LEN, MAVLINK_MSG_ID_WATER_DEPTH_LEN, MAVLINK_MSG_ID_WATER_DEPTH_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_WATER_DEPTH_MIN_LEN, MAVLINK_MSG_ID_WATER_DEPTH_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a water_depth message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -209,6 +272,20 @@ static inline uint16_t mavlink_msg_water_depth_encode_chan(uint8_t system_id, ui
|
||||
return mavlink_msg_water_depth_pack_chan(system_id, component_id, chan, msg, water_depth->time_boot_ms, water_depth->id, water_depth->healthy, water_depth->lat, water_depth->lng, water_depth->alt, water_depth->roll, water_depth->pitch, water_depth->yaw, water_depth->distance, water_depth->temperature);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a water_depth struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param water_depth C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_water_depth_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_water_depth_t* water_depth)
|
||||
{
|
||||
return mavlink_msg_water_depth_pack_status(system_id, component_id, _status, msg, water_depth->time_boot_ms, water_depth->id, water_depth->healthy, water_depth->lat, water_depth->lng, water_depth->alt, water_depth->roll, water_depth->pitch, water_depth->yaw, water_depth->distance, water_depth->temperature);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a water_depth message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -75,6 +75,45 @@ static inline uint16_t mavlink_msg_wind_pack(uint8_t system_id, uint8_t componen
|
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_WIND_MIN_LEN, MAVLINK_MSG_ID_WIND_LEN, MAVLINK_MSG_ID_WIND_CRC);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a wind message
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
*
|
||||
* @param direction [deg] Wind direction (that wind is coming from).
|
||||
* @param speed [m/s] Wind speed in ground plane.
|
||||
* @param speed_z [m/s] Vertical wind speed.
|
||||
* @return length of the message in bytes (excluding serial stream start sign)
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_wind_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
|
||||
float direction, float speed, float speed_z)
|
||||
{
|
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
|
||||
char buf[MAVLINK_MSG_ID_WIND_LEN];
|
||||
_mav_put_float(buf, 0, direction);
|
||||
_mav_put_float(buf, 4, speed);
|
||||
_mav_put_float(buf, 8, speed_z);
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_WIND_LEN);
|
||||
#else
|
||||
mavlink_wind_t packet;
|
||||
packet.direction = direction;
|
||||
packet.speed = speed;
|
||||
packet.speed_z = speed_z;
|
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_WIND_LEN);
|
||||
#endif
|
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_WIND;
|
||||
#if MAVLINK_CRC_EXTRA
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_WIND_MIN_LEN, MAVLINK_MSG_ID_WIND_LEN, MAVLINK_MSG_ID_WIND_CRC);
|
||||
#else
|
||||
return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_WIND_MIN_LEN, MAVLINK_MSG_ID_WIND_LEN);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Pack a wind message on a channel
|
||||
* @param system_id ID of this system
|
||||
@@ -137,6 +176,20 @@ static inline uint16_t mavlink_msg_wind_encode_chan(uint8_t system_id, uint8_t c
|
||||
return mavlink_msg_wind_pack_chan(system_id, component_id, chan, msg, wind->direction, wind->speed, wind->speed_z);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Encode a wind struct with provided status structure
|
||||
*
|
||||
* @param system_id ID of this system
|
||||
* @param component_id ID of this component (e.g. 200 for IMU)
|
||||
* @param status MAVLink status structure
|
||||
* @param msg The MAVLink message to compress the data into
|
||||
* @param wind C-struct to read the message contents from
|
||||
*/
|
||||
static inline uint16_t mavlink_msg_wind_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_wind_t* wind)
|
||||
{
|
||||
return mavlink_msg_wind_pack_status(system_id, component_id, _status, msg, wind->direction, wind->speed, wind->speed_z);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Send a wind message
|
||||
* @param chan MAVLink channel to send the message
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#ifndef MAVLINK_VERSION_H
|
||||
#define MAVLINK_VERSION_H
|
||||
|
||||
#define MAVLINK_BUILD_DATE "Mon Mar 04 2024"
|
||||
#define MAVLINK_BUILD_DATE "Wed Mar 06 2024"
|
||||
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
|
||||
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255
|
||||
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
#error Wrong include order: MAVLINK_COMMON.H MUST NOT BE DIRECTLY USED. Include mavlink.h from the same directory instead or set ALL AND EVERY defines from MAVLINK.H manually accordingly, including the #define MAVLINK_H call.
|
||||
#endif
|
||||
|
||||
#define MAVLINK_COMMON_XML_HASH -8883233578418662464
|
||||
#define MAVLINK_COMMON_XML_HASH 5594176508389277203
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
#ifndef MAVLINK_H
|
||||
#define MAVLINK_H
|
||||
|
||||
#define MAVLINK_PRIMARY_XML_HASH -8883233578418662464
|
||||
#define MAVLINK_PRIMARY_XML_HASH 5594176508389277203
|
||||
|
||||
#ifndef MAVLINK_STX
|
||||
#define MAVLINK_STX 253
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user