Skip to content

Commit

Permalink
autogenerated headers for rev https://github.com/mavlink/mavlink/tree…
Browse files Browse the repository at this point in the history
  • Loading branch information
PX4BuildBot committed Apr 16, 2018
1 parent c55dd0e commit 7aa6045
Show file tree
Hide file tree
Showing 15 changed files with 97 additions and 41 deletions.
2 changes: 1 addition & 1 deletion ASLUAV/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H

#define MAVLINK_BUILD_DATE "Thu Apr 12 2018"
#define MAVLINK_BUILD_DATE "Mon Apr 16 2018"
#define MAVLINK_WIRE_PROTOCOL_VERSION "2.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255

Expand Down
47 changes: 36 additions & 11 deletions ardupilotmega/mavlink_msg_camera_feedback.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ typedef struct __mavlink_camera_feedback_t {
uint8_t target_system; /*< System ID*/
uint8_t cam_idx; /*< Camera ID*/
uint8_t flags; /*< See CAMERA_FEEDBACK_FLAGS enum for definition of the bitmask*/
uint16_t completed_captures; /*< Completed image captures*/
}) mavlink_camera_feedback_t;

#define MAVLINK_MSG_ID_CAMERA_FEEDBACK_LEN 45
#define MAVLINK_MSG_ID_CAMERA_FEEDBACK_LEN 47
#define MAVLINK_MSG_ID_CAMERA_FEEDBACK_MIN_LEN 45
#define MAVLINK_MSG_ID_180_LEN 45
#define MAVLINK_MSG_ID_180_LEN 47
#define MAVLINK_MSG_ID_180_MIN_LEN 45

#define MAVLINK_MSG_ID_CAMERA_FEEDBACK_CRC 52
Expand All @@ -34,7 +35,7 @@ typedef struct __mavlink_camera_feedback_t {
#define MAVLINK_MESSAGE_INFO_CAMERA_FEEDBACK { \
180, \
"CAMERA_FEEDBACK", \
13, \
14, \
{ { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_camera_feedback_t, time_usec) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 42, offsetof(mavlink_camera_feedback_t, target_system) }, \
{ "cam_idx", NULL, MAVLINK_TYPE_UINT8_T, 0, 43, offsetof(mavlink_camera_feedback_t, cam_idx) }, \
Expand All @@ -48,12 +49,13 @@ typedef struct __mavlink_camera_feedback_t {
{ "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_camera_feedback_t, yaw) }, \
{ "foc_len", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_camera_feedback_t, foc_len) }, \
{ "flags", NULL, MAVLINK_TYPE_UINT8_T, 0, 44, offsetof(mavlink_camera_feedback_t, flags) }, \
{ "completed_captures", NULL, MAVLINK_TYPE_UINT16_T, 0, 45, offsetof(mavlink_camera_feedback_t, completed_captures) }, \
} \
}
#else
#define MAVLINK_MESSAGE_INFO_CAMERA_FEEDBACK { \
"CAMERA_FEEDBACK", \
13, \
14, \
{ { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_camera_feedback_t, time_usec) }, \
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 42, offsetof(mavlink_camera_feedback_t, target_system) }, \
{ "cam_idx", NULL, MAVLINK_TYPE_UINT8_T, 0, 43, offsetof(mavlink_camera_feedback_t, cam_idx) }, \
Expand All @@ -67,6 +69,7 @@ typedef struct __mavlink_camera_feedback_t {
{ "yaw", NULL, MAVLINK_TYPE_FLOAT, 0, 32, offsetof(mavlink_camera_feedback_t, yaw) }, \
{ "foc_len", NULL, MAVLINK_TYPE_FLOAT, 0, 36, offsetof(mavlink_camera_feedback_t, foc_len) }, \
{ "flags", NULL, MAVLINK_TYPE_UINT8_T, 0, 44, offsetof(mavlink_camera_feedback_t, flags) }, \
{ "completed_captures", NULL, MAVLINK_TYPE_UINT16_T, 0, 45, offsetof(mavlink_camera_feedback_t, completed_captures) }, \
} \
}
#endif
Expand All @@ -90,10 +93,11 @@ typedef struct __mavlink_camera_feedback_t {
* @param yaw Camera Yaw (earth frame, degrees, 0-360, true)
* @param foc_len Focal Length (mm)
* @param flags See CAMERA_FEEDBACK_FLAGS enum for definition of the bitmask
* @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(uint8_t system_id, uint8_t component_id, 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)
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];
Expand All @@ -110,6 +114,7 @@ static inline uint16_t mavlink_msg_camera_feedback_pack(uint8_t system_id, uint8
_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
Expand All @@ -127,6 +132,7 @@ static inline uint16_t mavlink_msg_camera_feedback_pack(uint8_t system_id, uint8
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
Expand Down Expand Up @@ -154,11 +160,12 @@ static inline uint16_t mavlink_msg_camera_feedback_pack(uint8_t system_id, uint8
* @param yaw Camera Yaw (earth frame, degrees, 0-360, true)
* @param foc_len Focal Length (mm)
* @param flags See CAMERA_FEEDBACK_FLAGS enum for definition of the bitmask
* @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_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
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)
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];
Expand All @@ -175,6 +182,7 @@ static inline uint16_t mavlink_msg_camera_feedback_pack_chan(uint8_t system_id,
_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
Expand All @@ -192,6 +200,7 @@ static inline uint16_t mavlink_msg_camera_feedback_pack_chan(uint8_t system_id,
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
Expand All @@ -210,7 +219,7 @@ static inline uint16_t mavlink_msg_camera_feedback_pack_chan(uint8_t system_id,
*/
static inline uint16_t mavlink_msg_camera_feedback_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_camera_feedback_t* camera_feedback)
{
return mavlink_msg_camera_feedback_pack(system_id, component_id, 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);
return mavlink_msg_camera_feedback_pack(system_id, component_id, 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);
}

/**
Expand All @@ -224,7 +233,7 @@ static inline uint16_t mavlink_msg_camera_feedback_encode(uint8_t system_id, uin
*/
static inline uint16_t mavlink_msg_camera_feedback_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_camera_feedback_t* camera_feedback)
{
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);
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);
}

/**
Expand All @@ -244,10 +253,11 @@ static inline uint16_t mavlink_msg_camera_feedback_encode_chan(uint8_t system_id
* @param yaw Camera Yaw (earth frame, degrees, 0-360, true)
* @param foc_len Focal Length (mm)
* @param flags See CAMERA_FEEDBACK_FLAGS enum for definition of the bitmask
* @param completed_captures Completed image captures
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS

static inline void mavlink_msg_camera_feedback_send(mavlink_channel_t chan, 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)
static inline void mavlink_msg_camera_feedback_send(mavlink_channel_t chan, 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];
Expand All @@ -264,6 +274,7 @@ static inline void mavlink_msg_camera_feedback_send(mavlink_channel_t chan, uint
_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);

_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_FEEDBACK, buf, MAVLINK_MSG_ID_CAMERA_FEEDBACK_MIN_LEN, MAVLINK_MSG_ID_CAMERA_FEEDBACK_LEN, MAVLINK_MSG_ID_CAMERA_FEEDBACK_CRC);
#else
Expand All @@ -281,6 +292,7 @@ static inline void mavlink_msg_camera_feedback_send(mavlink_channel_t chan, uint
packet.target_system = target_system;
packet.cam_idx = cam_idx;
packet.flags = flags;
packet.completed_captures = completed_captures;

_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_FEEDBACK, (const char *)&packet, MAVLINK_MSG_ID_CAMERA_FEEDBACK_MIN_LEN, MAVLINK_MSG_ID_CAMERA_FEEDBACK_LEN, MAVLINK_MSG_ID_CAMERA_FEEDBACK_CRC);
#endif
Expand All @@ -294,7 +306,7 @@ static inline void mavlink_msg_camera_feedback_send(mavlink_channel_t chan, uint
static inline void mavlink_msg_camera_feedback_send_struct(mavlink_channel_t chan, const mavlink_camera_feedback_t* camera_feedback)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
mavlink_msg_camera_feedback_send(chan, 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);
mavlink_msg_camera_feedback_send(chan, 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);
#else
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_FEEDBACK, (const char *)camera_feedback, MAVLINK_MSG_ID_CAMERA_FEEDBACK_MIN_LEN, MAVLINK_MSG_ID_CAMERA_FEEDBACK_LEN, MAVLINK_MSG_ID_CAMERA_FEEDBACK_CRC);
#endif
Expand All @@ -308,7 +320,7 @@ static inline void mavlink_msg_camera_feedback_send_struct(mavlink_channel_t cha
is usually the receive buffer for the channel, and allows a reply to an
incoming message with minimum stack space usage.
*/
static inline void mavlink_msg_camera_feedback_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, 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)
static inline void mavlink_msg_camera_feedback_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, 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 = (char *)msgbuf;
Expand All @@ -325,6 +337,7 @@ static inline void mavlink_msg_camera_feedback_send_buf(mavlink_message_t *msgbu
_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);

_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_FEEDBACK, buf, MAVLINK_MSG_ID_CAMERA_FEEDBACK_MIN_LEN, MAVLINK_MSG_ID_CAMERA_FEEDBACK_LEN, MAVLINK_MSG_ID_CAMERA_FEEDBACK_CRC);
#else
Expand All @@ -342,6 +355,7 @@ static inline void mavlink_msg_camera_feedback_send_buf(mavlink_message_t *msgbu
packet->target_system = target_system;
packet->cam_idx = cam_idx;
packet->flags = flags;
packet->completed_captures = completed_captures;

_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_FEEDBACK, (const char *)packet, MAVLINK_MSG_ID_CAMERA_FEEDBACK_MIN_LEN, MAVLINK_MSG_ID_CAMERA_FEEDBACK_LEN, MAVLINK_MSG_ID_CAMERA_FEEDBACK_CRC);
#endif
Expand Down Expand Up @@ -483,6 +497,16 @@ static inline uint8_t mavlink_msg_camera_feedback_get_flags(const mavlink_messag
return _MAV_RETURN_uint8_t(msg, 44);
}

/**
* @brief Get field completed_captures from camera_feedback message
*
* @return Completed image captures
*/
static inline uint16_t mavlink_msg_camera_feedback_get_completed_captures(const mavlink_message_t* msg)
{
return _MAV_RETURN_uint16_t(msg, 45);
}

/**
* @brief Decode a camera_feedback message into a struct
*
Expand All @@ -505,6 +529,7 @@ static inline void mavlink_msg_camera_feedback_decode(const mavlink_message_t* m
camera_feedback->target_system = mavlink_msg_camera_feedback_get_target_system(msg);
camera_feedback->cam_idx = mavlink_msg_camera_feedback_get_cam_idx(msg);
camera_feedback->flags = mavlink_msg_camera_feedback_get_flags(msg);
camera_feedback->completed_captures = mavlink_msg_camera_feedback_get_completed_captures(msg);
#else
uint8_t len = msg->len < MAVLINK_MSG_ID_CAMERA_FEEDBACK_LEN? msg->len : MAVLINK_MSG_ID_CAMERA_FEEDBACK_LEN;
memset(camera_feedback, 0, MAVLINK_MSG_ID_CAMERA_FEEDBACK_LEN);
Expand Down
Loading

0 comments on commit 7aa6045

Please sign in to comment.