Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
6a760287
Commit
6a760287
authored
Feb 22, 2012
by
LM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed QSerialPort baud rate selection, fixed target dir for build
parent
85240f3c
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
12 additions
and
2492 deletions
+12
-2492
qgroundcontrol.pro
qgroundcontrol.pro
+5
-0
mavlink.h
thirdParty/mavlink/include/sensesoar/mavlink.h
+0
-27
mavlink_msg_cmd_airspeed_ack.h
.../mavlink/include/sensesoar/mavlink_msg_cmd_airspeed_ack.h
+0
-166
mavlink_msg_cmd_airspeed_chng.h
...mavlink/include/sensesoar/mavlink_msg_cmd_airspeed_chng.h
+0
-166
mavlink_msg_filt_rot_vel.h
...arty/mavlink/include/sensesoar/mavlink_msg_filt_rot_vel.h
+0
-144
mavlink_msg_llc_out.h
thirdParty/mavlink/include/sensesoar/mavlink_msg_llc_out.h
+0
-167
mavlink_msg_obs_air_temp.h
...arty/mavlink/include/sensesoar/mavlink_msg_obs_air_temp.h
+0
-144
mavlink_msg_obs_air_velocity.h
.../mavlink/include/sensesoar/mavlink_msg_obs_air_velocity.h
+0
-188
mavlink_msg_obs_attitude.h
...arty/mavlink/include/sensesoar/mavlink_msg_obs_attitude.h
+0
-144
mavlink_msg_obs_bias.h
thirdParty/mavlink/include/sensesoar/mavlink_msg_obs_bias.h
+0
-167
mavlink_msg_obs_position.h
...arty/mavlink/include/sensesoar/mavlink_msg_obs_position.h
+0
-188
mavlink_msg_obs_qff.h
thirdParty/mavlink/include/sensesoar/mavlink_msg_obs_qff.h
+0
-144
mavlink_msg_obs_velocity.h
...arty/mavlink/include/sensesoar/mavlink_msg_obs_velocity.h
+0
-144
mavlink_msg_obs_wind.h
thirdParty/mavlink/include/sensesoar/mavlink_msg_obs_wind.h
+0
-144
mavlink_msg_pm_elec.h
thirdParty/mavlink/include/sensesoar/mavlink_msg_pm_elec.h
+0
-182
mavlink_msg_sys_stat.h
thirdParty/mavlink/include/sensesoar/mavlink_msg_sys_stat.h
+0
-210
sensesoar.h
thirdParty/mavlink/include/sensesoar/sensesoar.h
+0
-77
sensesoar.xml
thirdParty/mavlink/message_definitions/sensesoar.xml
+0
-83
qportsettings.h
thirdParty/qserialport/include/QtSerialPort/qportsettings.h
+7
-7
No files found.
qgroundcontrol.pro
View file @
6a760287
...
...
@@ -32,6 +32,7 @@ QT += network \
TEMPLATE
=
app
TARGET
=
qgroundcontrol
BASEDIR
=
$$
{
IN_PWD
}
linux
-
g
++
|
linux
-
g
++-
64
{
debug
{
TARGETDIR
=
$$
{
OUT_PWD
}
/
debug
BUILDDIR
=
$$
{
OUT_PWD
}
/
build
-
debug
...
...
@@ -40,6 +41,10 @@ release {
TARGETDIR
=
$$
{
OUT_PWD
}
/
release
BUILDDIR
=
$$
{
OUT_PWD
}
/
build
-
release
}
}
else
{
TARGETDIR
=
$$
{
OUT_PWD
}
BUILDDIR
=
$$
{
OUT_PWD
}
/
build
}
LANGUAGE
=
C
++
OBJECTS_DIR
=
$$
{
BUILDDIR
}
/
obj
MOC_DIR
=
$$
{
BUILDDIR
}
/
moc
...
...
thirdParty/mavlink/include/sensesoar/mavlink.h
deleted
100644 → 0
View file @
85240f3c
/** @file
* @brief MAVLink comm protocol built from sensesoar.xml
* @see http://pixhawk.ethz.ch/software/mavlink
*/
#ifndef MAVLINK_H
#define MAVLINK_H
#ifndef MAVLINK_STX
#define MAVLINK_STX 254
#endif
#ifndef MAVLINK_ENDIAN
#define MAVLINK_ENDIAN MAVLINK_LITTLE_ENDIAN
#endif
#ifndef MAVLINK_ALIGNED_FIELDS
#define MAVLINK_ALIGNED_FIELDS 1
#endif
#ifndef MAVLINK_CRC_EXTRA
#define MAVLINK_CRC_EXTRA 1
#endif
#include "version.h"
#include "sensesoar.h"
#endif // MAVLINK_H
thirdParty/mavlink/include/sensesoar/mavlink_msg_cmd_airspeed_ack.h
deleted
100644 → 0
View file @
85240f3c
// MESSAGE CMD_AIRSPEED_ACK PACKING
#define MAVLINK_MSG_ID_CMD_AIRSPEED_ACK 194
typedef
struct
__mavlink_cmd_airspeed_ack_t
{
float
spCmd
;
///< commanded airspeed
uint8_t
ack
;
///< 0:ack, 1:nack
}
mavlink_cmd_airspeed_ack_t
;
#define MAVLINK_MSG_ID_CMD_AIRSPEED_ACK_LEN 5
#define MAVLINK_MSG_ID_194_LEN 5
#define MAVLINK_MESSAGE_INFO_CMD_AIRSPEED_ACK { \
"CMD_AIRSPEED_ACK", \
2, \
{ { "spCmd", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_cmd_airspeed_ack_t, spCmd) }, \
{ "ack", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_cmd_airspeed_ack_t, ack) }, \
} \
}
/**
* @brief Pack a cmd_airspeed_ack message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param spCmd commanded airspeed
* @param ack 0:ack, 1:nack
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_cmd_airspeed_ack_pack
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
float
spCmd
,
uint8_t
ack
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
5
];
_mav_put_float
(
buf
,
0
,
spCmd
);
_mav_put_uint8_t
(
buf
,
4
,
ack
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
5
);
#else
mavlink_cmd_airspeed_ack_t
packet
;
packet
.
spCmd
=
spCmd
;
packet
.
ack
=
ack
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
5
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_CMD_AIRSPEED_ACK
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
5
,
243
);
}
/**
* @brief Pack a cmd_airspeed_ack message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param spCmd commanded airspeed
* @param ack 0:ack, 1:nack
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_cmd_airspeed_ack_pack_chan
(
uint8_t
system_id
,
uint8_t
component_id
,
uint8_t
chan
,
mavlink_message_t
*
msg
,
float
spCmd
,
uint8_t
ack
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
5
];
_mav_put_float
(
buf
,
0
,
spCmd
);
_mav_put_uint8_t
(
buf
,
4
,
ack
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
5
);
#else
mavlink_cmd_airspeed_ack_t
packet
;
packet
.
spCmd
=
spCmd
;
packet
.
ack
=
ack
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
5
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_CMD_AIRSPEED_ACK
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
5
,
243
);
}
/**
* @brief Encode a cmd_airspeed_ack struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param cmd_airspeed_ack C-struct to read the message contents from
*/
static
inline
uint16_t
mavlink_msg_cmd_airspeed_ack_encode
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
const
mavlink_cmd_airspeed_ack_t
*
cmd_airspeed_ack
)
{
return
mavlink_msg_cmd_airspeed_ack_pack
(
system_id
,
component_id
,
msg
,
cmd_airspeed_ack
->
spCmd
,
cmd_airspeed_ack
->
ack
);
}
/**
* @brief Send a cmd_airspeed_ack message
* @param chan MAVLink channel to send the message
*
* @param spCmd commanded airspeed
* @param ack 0:ack, 1:nack
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static
inline
void
mavlink_msg_cmd_airspeed_ack_send
(
mavlink_channel_t
chan
,
float
spCmd
,
uint8_t
ack
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
5
];
_mav_put_float
(
buf
,
0
,
spCmd
);
_mav_put_uint8_t
(
buf
,
4
,
ack
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_CMD_AIRSPEED_ACK
,
buf
,
5
,
243
);
#else
mavlink_cmd_airspeed_ack_t
packet
;
packet
.
spCmd
=
spCmd
;
packet
.
ack
=
ack
;
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_CMD_AIRSPEED_ACK
,
(
const
char
*
)
&
packet
,
5
,
243
);
#endif
}
#endif
// MESSAGE CMD_AIRSPEED_ACK UNPACKING
/**
* @brief Get field spCmd from cmd_airspeed_ack message
*
* @return commanded airspeed
*/
static
inline
float
mavlink_msg_cmd_airspeed_ack_get_spCmd
(
const
mavlink_message_t
*
msg
)
{
return
_MAV_RETURN_float
(
msg
,
0
);
}
/**
* @brief Get field ack from cmd_airspeed_ack message
*
* @return 0:ack, 1:nack
*/
static
inline
uint8_t
mavlink_msg_cmd_airspeed_ack_get_ack
(
const
mavlink_message_t
*
msg
)
{
return
_MAV_RETURN_uint8_t
(
msg
,
4
);
}
/**
* @brief Decode a cmd_airspeed_ack message into a struct
*
* @param msg The message to decode
* @param cmd_airspeed_ack C-struct to decode the message contents into
*/
static
inline
void
mavlink_msg_cmd_airspeed_ack_decode
(
const
mavlink_message_t
*
msg
,
mavlink_cmd_airspeed_ack_t
*
cmd_airspeed_ack
)
{
#if MAVLINK_NEED_BYTE_SWAP
cmd_airspeed_ack
->
spCmd
=
mavlink_msg_cmd_airspeed_ack_get_spCmd
(
msg
);
cmd_airspeed_ack
->
ack
=
mavlink_msg_cmd_airspeed_ack_get_ack
(
msg
);
#else
memcpy
(
cmd_airspeed_ack
,
_MAV_PAYLOAD
(
msg
),
5
);
#endif
}
thirdParty/mavlink/include/sensesoar/mavlink_msg_cmd_airspeed_chng.h
deleted
100644 → 0
View file @
85240f3c
// MESSAGE CMD_AIRSPEED_CHNG PACKING
#define MAVLINK_MSG_ID_CMD_AIRSPEED_CHNG 192
typedef
struct
__mavlink_cmd_airspeed_chng_t
{
float
spCmd
;
///< commanded airspeed
uint8_t
target
;
///< Target ID
}
mavlink_cmd_airspeed_chng_t
;
#define MAVLINK_MSG_ID_CMD_AIRSPEED_CHNG_LEN 5
#define MAVLINK_MSG_ID_192_LEN 5
#define MAVLINK_MESSAGE_INFO_CMD_AIRSPEED_CHNG { \
"CMD_AIRSPEED_CHNG", \
2, \
{ { "spCmd", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_cmd_airspeed_chng_t, spCmd) }, \
{ "target", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_cmd_airspeed_chng_t, target) }, \
} \
}
/**
* @brief Pack a cmd_airspeed_chng message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param target Target ID
* @param spCmd commanded airspeed
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_cmd_airspeed_chng_pack
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
uint8_t
target
,
float
spCmd
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
5
];
_mav_put_float
(
buf
,
0
,
spCmd
);
_mav_put_uint8_t
(
buf
,
4
,
target
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
5
);
#else
mavlink_cmd_airspeed_chng_t
packet
;
packet
.
spCmd
=
spCmd
;
packet
.
target
=
target
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
5
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_CMD_AIRSPEED_CHNG
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
5
,
209
);
}
/**
* @brief Pack a cmd_airspeed_chng message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param target Target ID
* @param spCmd commanded airspeed
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_cmd_airspeed_chng_pack_chan
(
uint8_t
system_id
,
uint8_t
component_id
,
uint8_t
chan
,
mavlink_message_t
*
msg
,
uint8_t
target
,
float
spCmd
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
5
];
_mav_put_float
(
buf
,
0
,
spCmd
);
_mav_put_uint8_t
(
buf
,
4
,
target
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
5
);
#else
mavlink_cmd_airspeed_chng_t
packet
;
packet
.
spCmd
=
spCmd
;
packet
.
target
=
target
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
5
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_CMD_AIRSPEED_CHNG
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
5
,
209
);
}
/**
* @brief Encode a cmd_airspeed_chng struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param cmd_airspeed_chng C-struct to read the message contents from
*/
static
inline
uint16_t
mavlink_msg_cmd_airspeed_chng_encode
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
const
mavlink_cmd_airspeed_chng_t
*
cmd_airspeed_chng
)
{
return
mavlink_msg_cmd_airspeed_chng_pack
(
system_id
,
component_id
,
msg
,
cmd_airspeed_chng
->
target
,
cmd_airspeed_chng
->
spCmd
);
}
/**
* @brief Send a cmd_airspeed_chng message
* @param chan MAVLink channel to send the message
*
* @param target Target ID
* @param spCmd commanded airspeed
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static
inline
void
mavlink_msg_cmd_airspeed_chng_send
(
mavlink_channel_t
chan
,
uint8_t
target
,
float
spCmd
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
5
];
_mav_put_float
(
buf
,
0
,
spCmd
);
_mav_put_uint8_t
(
buf
,
4
,
target
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_CMD_AIRSPEED_CHNG
,
buf
,
5
,
209
);
#else
mavlink_cmd_airspeed_chng_t
packet
;
packet
.
spCmd
=
spCmd
;
packet
.
target
=
target
;
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_CMD_AIRSPEED_CHNG
,
(
const
char
*
)
&
packet
,
5
,
209
);
#endif
}
#endif
// MESSAGE CMD_AIRSPEED_CHNG UNPACKING
/**
* @brief Get field target from cmd_airspeed_chng message
*
* @return Target ID
*/
static
inline
uint8_t
mavlink_msg_cmd_airspeed_chng_get_target
(
const
mavlink_message_t
*
msg
)
{
return
_MAV_RETURN_uint8_t
(
msg
,
4
);
}
/**
* @brief Get field spCmd from cmd_airspeed_chng message
*
* @return commanded airspeed
*/
static
inline
float
mavlink_msg_cmd_airspeed_chng_get_spCmd
(
const
mavlink_message_t
*
msg
)
{
return
_MAV_RETURN_float
(
msg
,
0
);
}
/**
* @brief Decode a cmd_airspeed_chng message into a struct
*
* @param msg The message to decode
* @param cmd_airspeed_chng C-struct to decode the message contents into
*/
static
inline
void
mavlink_msg_cmd_airspeed_chng_decode
(
const
mavlink_message_t
*
msg
,
mavlink_cmd_airspeed_chng_t
*
cmd_airspeed_chng
)
{
#if MAVLINK_NEED_BYTE_SWAP
cmd_airspeed_chng
->
spCmd
=
mavlink_msg_cmd_airspeed_chng_get_spCmd
(
msg
);
cmd_airspeed_chng
->
target
=
mavlink_msg_cmd_airspeed_chng_get_target
(
msg
);
#else
memcpy
(
cmd_airspeed_chng
,
_MAV_PAYLOAD
(
msg
),
5
);
#endif
}
thirdParty/mavlink/include/sensesoar/mavlink_msg_filt_rot_vel.h
deleted
100644 → 0
View file @
85240f3c
// MESSAGE FILT_ROT_VEL PACKING
#define MAVLINK_MSG_ID_FILT_ROT_VEL 184
typedef
struct
__mavlink_filt_rot_vel_t
{
float
rotVel
[
3
];
///< rotational velocity
}
mavlink_filt_rot_vel_t
;
#define MAVLINK_MSG_ID_FILT_ROT_VEL_LEN 12
#define MAVLINK_MSG_ID_184_LEN 12
#define MAVLINK_MSG_FILT_ROT_VEL_FIELD_ROTVEL_LEN 3
#define MAVLINK_MESSAGE_INFO_FILT_ROT_VEL { \
"FILT_ROT_VEL", \
1, \
{ { "rotVel", NULL, MAVLINK_TYPE_FLOAT, 3, 0, offsetof(mavlink_filt_rot_vel_t, rotVel) }, \
} \
}
/**
* @brief Pack a filt_rot_vel message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param rotVel rotational velocity
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_filt_rot_vel_pack
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
const
float
*
rotVel
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
12
];
_mav_put_float_array
(
buf
,
0
,
rotVel
,
3
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
12
);
#else
mavlink_filt_rot_vel_t
packet
;
mav_array_memcpy
(
packet
.
rotVel
,
rotVel
,
sizeof
(
float
)
*
3
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
12
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_FILT_ROT_VEL
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
12
,
79
);
}
/**
* @brief Pack a filt_rot_vel message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param rotVel rotational velocity
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_filt_rot_vel_pack_chan
(
uint8_t
system_id
,
uint8_t
component_id
,
uint8_t
chan
,
mavlink_message_t
*
msg
,
const
float
*
rotVel
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
12
];
_mav_put_float_array
(
buf
,
0
,
rotVel
,
3
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
12
);
#else
mavlink_filt_rot_vel_t
packet
;
mav_array_memcpy
(
packet
.
rotVel
,
rotVel
,
sizeof
(
float
)
*
3
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
12
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_FILT_ROT_VEL
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
12
,
79
);
}
/**
* @brief Encode a filt_rot_vel struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param filt_rot_vel C-struct to read the message contents from
*/
static
inline
uint16_t
mavlink_msg_filt_rot_vel_encode
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
const
mavlink_filt_rot_vel_t
*
filt_rot_vel
)
{
return
mavlink_msg_filt_rot_vel_pack
(
system_id
,
component_id
,
msg
,
filt_rot_vel
->
rotVel
);
}
/**
* @brief Send a filt_rot_vel message
* @param chan MAVLink channel to send the message
*
* @param rotVel rotational velocity
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static
inline
void
mavlink_msg_filt_rot_vel_send
(
mavlink_channel_t
chan
,
const
float
*
rotVel
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
12
];
_mav_put_float_array
(
buf
,
0
,
rotVel
,
3
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_FILT_ROT_VEL
,
buf
,
12
,
79
);
#else
mavlink_filt_rot_vel_t
packet
;
mav_array_memcpy
(
packet
.
rotVel
,
rotVel
,
sizeof
(
float
)
*
3
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_FILT_ROT_VEL
,
(
const
char
*
)
&
packet
,
12
,
79
);
#endif
}
#endif
// MESSAGE FILT_ROT_VEL UNPACKING
/**
* @brief Get field rotVel from filt_rot_vel message
*
* @return rotational velocity
*/
static
inline
uint16_t
mavlink_msg_filt_rot_vel_get_rotVel
(
const
mavlink_message_t
*
msg
,
float
*
rotVel
)
{
return
_MAV_RETURN_float_array
(
msg
,
rotVel
,
3
,
0
);
}
/**
* @brief Decode a filt_rot_vel message into a struct
*
* @param msg The message to decode
* @param filt_rot_vel C-struct to decode the message contents into
*/
static
inline
void
mavlink_msg_filt_rot_vel_decode
(
const
mavlink_message_t
*
msg
,
mavlink_filt_rot_vel_t
*
filt_rot_vel
)
{
#if MAVLINK_NEED_BYTE_SWAP
mavlink_msg_filt_rot_vel_get_rotVel
(
msg
,
filt_rot_vel
->
rotVel
);
#else
memcpy
(
filt_rot_vel
,
_MAV_PAYLOAD
(
msg
),
12
);
#endif
}
thirdParty/mavlink/include/sensesoar/mavlink_msg_llc_out.h
deleted
100644 → 0
View file @
85240f3c
// MESSAGE LLC_OUT PACKING
#define MAVLINK_MSG_ID_LLC_OUT 186
typedef
struct
__mavlink_llc_out_t
{
int16_t
servoOut
[
4
];
///< Servo signal
int16_t
MotorOut
[
2
];
///< motor signal
}
mavlink_llc_out_t
;
#define MAVLINK_MSG_ID_LLC_OUT_LEN 12
#define MAVLINK_MSG_ID_186_LEN 12
#define MAVLINK_MSG_LLC_OUT_FIELD_SERVOOUT_LEN 4
#define MAVLINK_MSG_LLC_OUT_FIELD_MOTOROUT_LEN 2
#define MAVLINK_MESSAGE_INFO_LLC_OUT { \
"LLC_OUT", \
2, \
{ { "servoOut", NULL, MAVLINK_TYPE_INT16_T, 4, 0, offsetof(mavlink_llc_out_t, servoOut) }, \
{ "MotorOut", NULL, MAVLINK_TYPE_INT16_T, 2, 8, offsetof(mavlink_llc_out_t, MotorOut) }, \
} \
}
/**
* @brief Pack a llc_out message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param servoOut Servo signal
* @param MotorOut motor signal
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_llc_out_pack
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
const
int16_t
*
servoOut
,
const
int16_t
*
MotorOut
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
12
];
_mav_put_int16_t_array
(
buf
,
0
,
servoOut
,
4
);
_mav_put_int16_t_array
(
buf
,
8
,
MotorOut
,
2
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
12
);
#else
mavlink_llc_out_t
packet
;
mav_array_memcpy
(
packet
.
servoOut
,
servoOut
,
sizeof
(
int16_t
)
*
4
);
mav_array_memcpy
(
packet
.
MotorOut
,
MotorOut
,
sizeof
(
int16_t
)
*
2
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
12
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_LLC_OUT
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
12
,
5
);
}
/**
* @brief Pack a llc_out message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param servoOut Servo signal
* @param MotorOut motor signal
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_llc_out_pack_chan
(
uint8_t
system_id
,
uint8_t
component_id
,
uint8_t
chan
,
mavlink_message_t
*
msg
,
const
int16_t
*
servoOut
,
const
int16_t
*
MotorOut
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
12
];
_mav_put_int16_t_array
(
buf
,
0
,
servoOut
,
4
);
_mav_put_int16_t_array
(
buf
,
8
,
MotorOut
,
2
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
12
);
#else
mavlink_llc_out_t
packet
;
mav_array_memcpy
(
packet
.
servoOut
,
servoOut
,
sizeof
(
int16_t
)
*
4
);
mav_array_memcpy
(
packet
.
MotorOut
,
MotorOut
,
sizeof
(
int16_t
)
*
2
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
12
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_LLC_OUT
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
12
,
5
);
}
/**
* @brief Encode a llc_out struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param llc_out C-struct to read the message contents from
*/
static
inline
uint16_t
mavlink_msg_llc_out_encode
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
const
mavlink_llc_out_t
*
llc_out
)
{
return
mavlink_msg_llc_out_pack
(
system_id
,
component_id
,
msg
,
llc_out
->
servoOut
,
llc_out
->
MotorOut
);
}
/**
* @brief Send a llc_out message
* @param chan MAVLink channel to send the message
*
* @param servoOut Servo signal
* @param MotorOut motor signal
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static
inline
void
mavlink_msg_llc_out_send
(
mavlink_channel_t
chan
,
const
int16_t
*
servoOut
,
const
int16_t
*
MotorOut
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
12
];
_mav_put_int16_t_array
(
buf
,
0
,
servoOut
,
4
);
_mav_put_int16_t_array
(
buf
,
8
,
MotorOut
,
2
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_LLC_OUT
,
buf
,
12
,
5
);
#else
mavlink_llc_out_t
packet
;
mav_array_memcpy
(
packet
.
servoOut
,
servoOut
,
sizeof
(
int16_t
)
*
4
);
mav_array_memcpy
(
packet
.
MotorOut
,
MotorOut
,
sizeof
(
int16_t
)
*
2
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_LLC_OUT
,
(
const
char
*
)
&
packet
,
12
,
5
);
#endif
}
#endif
// MESSAGE LLC_OUT UNPACKING
/**
* @brief Get field servoOut from llc_out message
*
* @return Servo signal
*/
static
inline
uint16_t
mavlink_msg_llc_out_get_servoOut
(
const
mavlink_message_t
*
msg
,
int16_t
*
servoOut
)
{
return
_MAV_RETURN_int16_t_array
(
msg
,
servoOut
,
4
,
0
);
}
/**
* @brief Get field MotorOut from llc_out message
*
* @return motor signal
*/
static
inline
uint16_t
mavlink_msg_llc_out_get_MotorOut
(
const
mavlink_message_t
*
msg
,
int16_t
*
MotorOut
)
{
return
_MAV_RETURN_int16_t_array
(
msg
,
MotorOut
,
2
,
8
);
}
/**
* @brief Decode a llc_out message into a struct
*
* @param msg The message to decode
* @param llc_out C-struct to decode the message contents into
*/
static
inline
void
mavlink_msg_llc_out_decode
(
const
mavlink_message_t
*
msg
,
mavlink_llc_out_t
*
llc_out
)
{
#if MAVLINK_NEED_BYTE_SWAP
mavlink_msg_llc_out_get_servoOut
(
msg
,
llc_out
->
servoOut
);
mavlink_msg_llc_out_get_MotorOut
(
msg
,
llc_out
->
MotorOut
);
#else
memcpy
(
llc_out
,
_MAV_PAYLOAD
(
msg
),
12
);
#endif
}
thirdParty/mavlink/include/sensesoar/mavlink_msg_obs_air_temp.h
deleted
100644 → 0
View file @
85240f3c
// MESSAGE OBS_AIR_TEMP PACKING
#define MAVLINK_MSG_ID_OBS_AIR_TEMP 183
typedef
struct
__mavlink_obs_air_temp_t
{
float
airT
;
///< Air Temperatur
}
mavlink_obs_air_temp_t
;
#define MAVLINK_MSG_ID_OBS_AIR_TEMP_LEN 4
#define MAVLINK_MSG_ID_183_LEN 4
#define MAVLINK_MESSAGE_INFO_OBS_AIR_TEMP { \
"OBS_AIR_TEMP", \
1, \
{ { "airT", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_obs_air_temp_t, airT) }, \
} \
}
/**
* @brief Pack a obs_air_temp message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param airT Air Temperatur
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_obs_air_temp_pack
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
float
airT
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
4
];
_mav_put_float
(
buf
,
0
,
airT
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
4
);
#else
mavlink_obs_air_temp_t
packet
;
packet
.
airT
=
airT
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
4
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_OBS_AIR_TEMP
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
4
,
248
);
}
/**
* @brief Pack a obs_air_temp message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param airT Air Temperatur
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_obs_air_temp_pack_chan
(
uint8_t
system_id
,
uint8_t
component_id
,
uint8_t
chan
,
mavlink_message_t
*
msg
,
float
airT
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
4
];
_mav_put_float
(
buf
,
0
,
airT
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
4
);
#else
mavlink_obs_air_temp_t
packet
;
packet
.
airT
=
airT
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
4
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_OBS_AIR_TEMP
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
4
,
248
);
}
/**
* @brief Encode a obs_air_temp struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param obs_air_temp C-struct to read the message contents from
*/
static
inline
uint16_t
mavlink_msg_obs_air_temp_encode
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
const
mavlink_obs_air_temp_t
*
obs_air_temp
)
{
return
mavlink_msg_obs_air_temp_pack
(
system_id
,
component_id
,
msg
,
obs_air_temp
->
airT
);
}
/**
* @brief Send a obs_air_temp message
* @param chan MAVLink channel to send the message
*
* @param airT Air Temperatur
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static
inline
void
mavlink_msg_obs_air_temp_send
(
mavlink_channel_t
chan
,
float
airT
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
4
];
_mav_put_float
(
buf
,
0
,
airT
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_OBS_AIR_TEMP
,
buf
,
4
,
248
);
#else
mavlink_obs_air_temp_t
packet
;
packet
.
airT
=
airT
;
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_OBS_AIR_TEMP
,
(
const
char
*
)
&
packet
,
4
,
248
);
#endif
}
#endif
// MESSAGE OBS_AIR_TEMP UNPACKING
/**
* @brief Get field airT from obs_air_temp message
*
* @return Air Temperatur
*/
static
inline
float
mavlink_msg_obs_air_temp_get_airT
(
const
mavlink_message_t
*
msg
)
{
return
_MAV_RETURN_float
(
msg
,
0
);
}
/**
* @brief Decode a obs_air_temp message into a struct
*
* @param msg The message to decode
* @param obs_air_temp C-struct to decode the message contents into
*/
static
inline
void
mavlink_msg_obs_air_temp_decode
(
const
mavlink_message_t
*
msg
,
mavlink_obs_air_temp_t
*
obs_air_temp
)
{
#if MAVLINK_NEED_BYTE_SWAP
obs_air_temp
->
airT
=
mavlink_msg_obs_air_temp_get_airT
(
msg
);
#else
memcpy
(
obs_air_temp
,
_MAV_PAYLOAD
(
msg
),
4
);
#endif
}
thirdParty/mavlink/include/sensesoar/mavlink_msg_obs_air_velocity.h
deleted
100644 → 0
View file @
85240f3c
// MESSAGE OBS_AIR_VELOCITY PACKING
#define MAVLINK_MSG_ID_OBS_AIR_VELOCITY 178
typedef
struct
__mavlink_obs_air_velocity_t
{
float
magnitude
;
///< Air speed
float
aoa
;
///< angle of attack
float
slip
;
///< slip angle
}
mavlink_obs_air_velocity_t
;
#define MAVLINK_MSG_ID_OBS_AIR_VELOCITY_LEN 12
#define MAVLINK_MSG_ID_178_LEN 12
#define MAVLINK_MESSAGE_INFO_OBS_AIR_VELOCITY { \
"OBS_AIR_VELOCITY", \
3, \
{ { "magnitude", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_obs_air_velocity_t, magnitude) }, \
{ "aoa", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_obs_air_velocity_t, aoa) }, \
{ "slip", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_obs_air_velocity_t, slip) }, \
} \
}
/**
* @brief Pack a obs_air_velocity message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param magnitude Air speed
* @param aoa angle of attack
* @param slip slip angle
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_obs_air_velocity_pack
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
float
magnitude
,
float
aoa
,
float
slip
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
12
];
_mav_put_float
(
buf
,
0
,
magnitude
);
_mav_put_float
(
buf
,
4
,
aoa
);
_mav_put_float
(
buf
,
8
,
slip
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
12
);
#else
mavlink_obs_air_velocity_t
packet
;
packet
.
magnitude
=
magnitude
;
packet
.
aoa
=
aoa
;
packet
.
slip
=
slip
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
12
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_OBS_AIR_VELOCITY
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
12
,
32
);
}
/**
* @brief Pack a obs_air_velocity message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param magnitude Air speed
* @param aoa angle of attack
* @param slip slip angle
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_obs_air_velocity_pack_chan
(
uint8_t
system_id
,
uint8_t
component_id
,
uint8_t
chan
,
mavlink_message_t
*
msg
,
float
magnitude
,
float
aoa
,
float
slip
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
12
];
_mav_put_float
(
buf
,
0
,
magnitude
);
_mav_put_float
(
buf
,
4
,
aoa
);
_mav_put_float
(
buf
,
8
,
slip
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
12
);
#else
mavlink_obs_air_velocity_t
packet
;
packet
.
magnitude
=
magnitude
;
packet
.
aoa
=
aoa
;
packet
.
slip
=
slip
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
12
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_OBS_AIR_VELOCITY
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
12
,
32
);
}
/**
* @brief Encode a obs_air_velocity struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param obs_air_velocity C-struct to read the message contents from
*/
static
inline
uint16_t
mavlink_msg_obs_air_velocity_encode
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
const
mavlink_obs_air_velocity_t
*
obs_air_velocity
)
{
return
mavlink_msg_obs_air_velocity_pack
(
system_id
,
component_id
,
msg
,
obs_air_velocity
->
magnitude
,
obs_air_velocity
->
aoa
,
obs_air_velocity
->
slip
);
}
/**
* @brief Send a obs_air_velocity message
* @param chan MAVLink channel to send the message
*
* @param magnitude Air speed
* @param aoa angle of attack
* @param slip slip angle
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static
inline
void
mavlink_msg_obs_air_velocity_send
(
mavlink_channel_t
chan
,
float
magnitude
,
float
aoa
,
float
slip
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
12
];
_mav_put_float
(
buf
,
0
,
magnitude
);
_mav_put_float
(
buf
,
4
,
aoa
);
_mav_put_float
(
buf
,
8
,
slip
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_OBS_AIR_VELOCITY
,
buf
,
12
,
32
);
#else
mavlink_obs_air_velocity_t
packet
;
packet
.
magnitude
=
magnitude
;
packet
.
aoa
=
aoa
;
packet
.
slip
=
slip
;
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_OBS_AIR_VELOCITY
,
(
const
char
*
)
&
packet
,
12
,
32
);
#endif
}
#endif
// MESSAGE OBS_AIR_VELOCITY UNPACKING
/**
* @brief Get field magnitude from obs_air_velocity message
*
* @return Air speed
*/
static
inline
float
mavlink_msg_obs_air_velocity_get_magnitude
(
const
mavlink_message_t
*
msg
)
{
return
_MAV_RETURN_float
(
msg
,
0
);
}
/**
* @brief Get field aoa from obs_air_velocity message
*
* @return angle of attack
*/
static
inline
float
mavlink_msg_obs_air_velocity_get_aoa
(
const
mavlink_message_t
*
msg
)
{
return
_MAV_RETURN_float
(
msg
,
4
);
}
/**
* @brief Get field slip from obs_air_velocity message
*
* @return slip angle
*/
static
inline
float
mavlink_msg_obs_air_velocity_get_slip
(
const
mavlink_message_t
*
msg
)
{
return
_MAV_RETURN_float
(
msg
,
8
);
}
/**
* @brief Decode a obs_air_velocity message into a struct
*
* @param msg The message to decode
* @param obs_air_velocity C-struct to decode the message contents into
*/
static
inline
void
mavlink_msg_obs_air_velocity_decode
(
const
mavlink_message_t
*
msg
,
mavlink_obs_air_velocity_t
*
obs_air_velocity
)
{
#if MAVLINK_NEED_BYTE_SWAP
obs_air_velocity
->
magnitude
=
mavlink_msg_obs_air_velocity_get_magnitude
(
msg
);
obs_air_velocity
->
aoa
=
mavlink_msg_obs_air_velocity_get_aoa
(
msg
);
obs_air_velocity
->
slip
=
mavlink_msg_obs_air_velocity_get_slip
(
msg
);
#else
memcpy
(
obs_air_velocity
,
_MAV_PAYLOAD
(
msg
),
12
);
#endif
}
thirdParty/mavlink/include/sensesoar/mavlink_msg_obs_attitude.h
deleted
100644 → 0
View file @
85240f3c
// MESSAGE OBS_ATTITUDE PACKING
#define MAVLINK_MSG_ID_OBS_ATTITUDE 174
typedef
struct
__mavlink_obs_attitude_t
{
double
quat
[
4
];
///< Quaternion re;im
}
mavlink_obs_attitude_t
;
#define MAVLINK_MSG_ID_OBS_ATTITUDE_LEN 32
#define MAVLINK_MSG_ID_174_LEN 32
#define MAVLINK_MSG_OBS_ATTITUDE_FIELD_QUAT_LEN 4
#define MAVLINK_MESSAGE_INFO_OBS_ATTITUDE { \
"OBS_ATTITUDE", \
1, \
{ { "quat", NULL, MAVLINK_TYPE_DOUBLE, 4, 0, offsetof(mavlink_obs_attitude_t, quat) }, \
} \
}
/**
* @brief Pack a obs_attitude message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param quat Quaternion re;im
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_obs_attitude_pack
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
const
double
*
quat
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
32
];
_mav_put_double_array
(
buf
,
0
,
quat
,
4
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
32
);
#else
mavlink_obs_attitude_t
packet
;
mav_array_memcpy
(
packet
.
quat
,
quat
,
sizeof
(
double
)
*
4
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
32
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_OBS_ATTITUDE
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
32
,
146
);
}
/**
* @brief Pack a obs_attitude message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param quat Quaternion re;im
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_obs_attitude_pack_chan
(
uint8_t
system_id
,
uint8_t
component_id
,
uint8_t
chan
,
mavlink_message_t
*
msg
,
const
double
*
quat
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
32
];
_mav_put_double_array
(
buf
,
0
,
quat
,
4
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
32
);
#else
mavlink_obs_attitude_t
packet
;
mav_array_memcpy
(
packet
.
quat
,
quat
,
sizeof
(
double
)
*
4
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
32
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_OBS_ATTITUDE
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
32
,
146
);
}
/**
* @brief Encode a obs_attitude struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param obs_attitude C-struct to read the message contents from
*/
static
inline
uint16_t
mavlink_msg_obs_attitude_encode
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
const
mavlink_obs_attitude_t
*
obs_attitude
)
{
return
mavlink_msg_obs_attitude_pack
(
system_id
,
component_id
,
msg
,
obs_attitude
->
quat
);
}
/**
* @brief Send a obs_attitude message
* @param chan MAVLink channel to send the message
*
* @param quat Quaternion re;im
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static
inline
void
mavlink_msg_obs_attitude_send
(
mavlink_channel_t
chan
,
const
double
*
quat
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
32
];
_mav_put_double_array
(
buf
,
0
,
quat
,
4
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_OBS_ATTITUDE
,
buf
,
32
,
146
);
#else
mavlink_obs_attitude_t
packet
;
mav_array_memcpy
(
packet
.
quat
,
quat
,
sizeof
(
double
)
*
4
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_OBS_ATTITUDE
,
(
const
char
*
)
&
packet
,
32
,
146
);
#endif
}
#endif
// MESSAGE OBS_ATTITUDE UNPACKING
/**
* @brief Get field quat from obs_attitude message
*
* @return Quaternion re;im
*/
static
inline
uint16_t
mavlink_msg_obs_attitude_get_quat
(
const
mavlink_message_t
*
msg
,
double
*
quat
)
{
return
_MAV_RETURN_double_array
(
msg
,
quat
,
4
,
0
);
}
/**
* @brief Decode a obs_attitude message into a struct
*
* @param msg The message to decode
* @param obs_attitude C-struct to decode the message contents into
*/
static
inline
void
mavlink_msg_obs_attitude_decode
(
const
mavlink_message_t
*
msg
,
mavlink_obs_attitude_t
*
obs_attitude
)
{
#if MAVLINK_NEED_BYTE_SWAP
mavlink_msg_obs_attitude_get_quat
(
msg
,
obs_attitude
->
quat
);
#else
memcpy
(
obs_attitude
,
_MAV_PAYLOAD
(
msg
),
32
);
#endif
}
thirdParty/mavlink/include/sensesoar/mavlink_msg_obs_bias.h
deleted
100644 → 0
View file @
85240f3c
// MESSAGE OBS_BIAS PACKING
#define MAVLINK_MSG_ID_OBS_BIAS 180
typedef
struct
__mavlink_obs_bias_t
{
float
accBias
[
3
];
///< accelerometer bias
float
gyroBias
[
3
];
///< gyroscope bias
}
mavlink_obs_bias_t
;
#define MAVLINK_MSG_ID_OBS_BIAS_LEN 24
#define MAVLINK_MSG_ID_180_LEN 24
#define MAVLINK_MSG_OBS_BIAS_FIELD_ACCBIAS_LEN 3
#define MAVLINK_MSG_OBS_BIAS_FIELD_GYROBIAS_LEN 3
#define MAVLINK_MESSAGE_INFO_OBS_BIAS { \
"OBS_BIAS", \
2, \
{ { "accBias", NULL, MAVLINK_TYPE_FLOAT, 3, 0, offsetof(mavlink_obs_bias_t, accBias) }, \
{ "gyroBias", NULL, MAVLINK_TYPE_FLOAT, 3, 12, offsetof(mavlink_obs_bias_t, gyroBias) }, \
} \
}
/**
* @brief Pack a obs_bias message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param accBias accelerometer bias
* @param gyroBias gyroscope bias
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_obs_bias_pack
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
const
float
*
accBias
,
const
float
*
gyroBias
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
24
];
_mav_put_float_array
(
buf
,
0
,
accBias
,
3
);
_mav_put_float_array
(
buf
,
12
,
gyroBias
,
3
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
24
);
#else
mavlink_obs_bias_t
packet
;
mav_array_memcpy
(
packet
.
accBias
,
accBias
,
sizeof
(
float
)
*
3
);
mav_array_memcpy
(
packet
.
gyroBias
,
gyroBias
,
sizeof
(
float
)
*
3
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
24
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_OBS_BIAS
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
24
,
159
);
}
/**
* @brief Pack a obs_bias message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param accBias accelerometer bias
* @param gyroBias gyroscope bias
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_obs_bias_pack_chan
(
uint8_t
system_id
,
uint8_t
component_id
,
uint8_t
chan
,
mavlink_message_t
*
msg
,
const
float
*
accBias
,
const
float
*
gyroBias
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
24
];
_mav_put_float_array
(
buf
,
0
,
accBias
,
3
);
_mav_put_float_array
(
buf
,
12
,
gyroBias
,
3
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
24
);
#else
mavlink_obs_bias_t
packet
;
mav_array_memcpy
(
packet
.
accBias
,
accBias
,
sizeof
(
float
)
*
3
);
mav_array_memcpy
(
packet
.
gyroBias
,
gyroBias
,
sizeof
(
float
)
*
3
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
24
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_OBS_BIAS
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
24
,
159
);
}
/**
* @brief Encode a obs_bias struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param obs_bias C-struct to read the message contents from
*/
static
inline
uint16_t
mavlink_msg_obs_bias_encode
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
const
mavlink_obs_bias_t
*
obs_bias
)
{
return
mavlink_msg_obs_bias_pack
(
system_id
,
component_id
,
msg
,
obs_bias
->
accBias
,
obs_bias
->
gyroBias
);
}
/**
* @brief Send a obs_bias message
* @param chan MAVLink channel to send the message
*
* @param accBias accelerometer bias
* @param gyroBias gyroscope bias
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static
inline
void
mavlink_msg_obs_bias_send
(
mavlink_channel_t
chan
,
const
float
*
accBias
,
const
float
*
gyroBias
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
24
];
_mav_put_float_array
(
buf
,
0
,
accBias
,
3
);
_mav_put_float_array
(
buf
,
12
,
gyroBias
,
3
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_OBS_BIAS
,
buf
,
24
,
159
);
#else
mavlink_obs_bias_t
packet
;
mav_array_memcpy
(
packet
.
accBias
,
accBias
,
sizeof
(
float
)
*
3
);
mav_array_memcpy
(
packet
.
gyroBias
,
gyroBias
,
sizeof
(
float
)
*
3
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_OBS_BIAS
,
(
const
char
*
)
&
packet
,
24
,
159
);
#endif
}
#endif
// MESSAGE OBS_BIAS UNPACKING
/**
* @brief Get field accBias from obs_bias message
*
* @return accelerometer bias
*/
static
inline
uint16_t
mavlink_msg_obs_bias_get_accBias
(
const
mavlink_message_t
*
msg
,
float
*
accBias
)
{
return
_MAV_RETURN_float_array
(
msg
,
accBias
,
3
,
0
);
}
/**
* @brief Get field gyroBias from obs_bias message
*
* @return gyroscope bias
*/
static
inline
uint16_t
mavlink_msg_obs_bias_get_gyroBias
(
const
mavlink_message_t
*
msg
,
float
*
gyroBias
)
{
return
_MAV_RETURN_float_array
(
msg
,
gyroBias
,
3
,
12
);
}
/**
* @brief Decode a obs_bias message into a struct
*
* @param msg The message to decode
* @param obs_bias C-struct to decode the message contents into
*/
static
inline
void
mavlink_msg_obs_bias_decode
(
const
mavlink_message_t
*
msg
,
mavlink_obs_bias_t
*
obs_bias
)
{
#if MAVLINK_NEED_BYTE_SWAP
mavlink_msg_obs_bias_get_accBias
(
msg
,
obs_bias
->
accBias
);
mavlink_msg_obs_bias_get_gyroBias
(
msg
,
obs_bias
->
gyroBias
);
#else
memcpy
(
obs_bias
,
_MAV_PAYLOAD
(
msg
),
24
);
#endif
}
thirdParty/mavlink/include/sensesoar/mavlink_msg_obs_position.h
deleted
100644 → 0
View file @
85240f3c
// MESSAGE OBS_POSITION PACKING
#define MAVLINK_MSG_ID_OBS_POSITION 170
typedef
struct
__mavlink_obs_position_t
{
int32_t
lon
;
///< Longitude expressed in 1E7
int32_t
lat
;
///< Latitude expressed in 1E7
int32_t
alt
;
///< Altitude expressed in milimeters
}
mavlink_obs_position_t
;
#define MAVLINK_MSG_ID_OBS_POSITION_LEN 12
#define MAVLINK_MSG_ID_170_LEN 12
#define MAVLINK_MESSAGE_INFO_OBS_POSITION { \
"OBS_POSITION", \
3, \
{ { "lon", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_obs_position_t, lon) }, \
{ "lat", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_obs_position_t, lat) }, \
{ "alt", NULL, MAVLINK_TYPE_INT32_T, 0, 8, offsetof(mavlink_obs_position_t, alt) }, \
} \
}
/**
* @brief Pack a obs_position message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param lon Longitude expressed in 1E7
* @param lat Latitude expressed in 1E7
* @param alt Altitude expressed in milimeters
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_obs_position_pack
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
int32_t
lon
,
int32_t
lat
,
int32_t
alt
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
12
];
_mav_put_int32_t
(
buf
,
0
,
lon
);
_mav_put_int32_t
(
buf
,
4
,
lat
);
_mav_put_int32_t
(
buf
,
8
,
alt
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
12
);
#else
mavlink_obs_position_t
packet
;
packet
.
lon
=
lon
;
packet
.
lat
=
lat
;
packet
.
alt
=
alt
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
12
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_OBS_POSITION
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
12
,
15
);
}
/**
* @brief Pack a obs_position message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param lon Longitude expressed in 1E7
* @param lat Latitude expressed in 1E7
* @param alt Altitude expressed in milimeters
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_obs_position_pack_chan
(
uint8_t
system_id
,
uint8_t
component_id
,
uint8_t
chan
,
mavlink_message_t
*
msg
,
int32_t
lon
,
int32_t
lat
,
int32_t
alt
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
12
];
_mav_put_int32_t
(
buf
,
0
,
lon
);
_mav_put_int32_t
(
buf
,
4
,
lat
);
_mav_put_int32_t
(
buf
,
8
,
alt
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
12
);
#else
mavlink_obs_position_t
packet
;
packet
.
lon
=
lon
;
packet
.
lat
=
lat
;
packet
.
alt
=
alt
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
12
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_OBS_POSITION
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
12
,
15
);
}
/**
* @brief Encode a obs_position struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param obs_position C-struct to read the message contents from
*/
static
inline
uint16_t
mavlink_msg_obs_position_encode
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
const
mavlink_obs_position_t
*
obs_position
)
{
return
mavlink_msg_obs_position_pack
(
system_id
,
component_id
,
msg
,
obs_position
->
lon
,
obs_position
->
lat
,
obs_position
->
alt
);
}
/**
* @brief Send a obs_position message
* @param chan MAVLink channel to send the message
*
* @param lon Longitude expressed in 1E7
* @param lat Latitude expressed in 1E7
* @param alt Altitude expressed in milimeters
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static
inline
void
mavlink_msg_obs_position_send
(
mavlink_channel_t
chan
,
int32_t
lon
,
int32_t
lat
,
int32_t
alt
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
12
];
_mav_put_int32_t
(
buf
,
0
,
lon
);
_mav_put_int32_t
(
buf
,
4
,
lat
);
_mav_put_int32_t
(
buf
,
8
,
alt
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_OBS_POSITION
,
buf
,
12
,
15
);
#else
mavlink_obs_position_t
packet
;
packet
.
lon
=
lon
;
packet
.
lat
=
lat
;
packet
.
alt
=
alt
;
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_OBS_POSITION
,
(
const
char
*
)
&
packet
,
12
,
15
);
#endif
}
#endif
// MESSAGE OBS_POSITION UNPACKING
/**
* @brief Get field lon from obs_position message
*
* @return Longitude expressed in 1E7
*/
static
inline
int32_t
mavlink_msg_obs_position_get_lon
(
const
mavlink_message_t
*
msg
)
{
return
_MAV_RETURN_int32_t
(
msg
,
0
);
}
/**
* @brief Get field lat from obs_position message
*
* @return Latitude expressed in 1E7
*/
static
inline
int32_t
mavlink_msg_obs_position_get_lat
(
const
mavlink_message_t
*
msg
)
{
return
_MAV_RETURN_int32_t
(
msg
,
4
);
}
/**
* @brief Get field alt from obs_position message
*
* @return Altitude expressed in milimeters
*/
static
inline
int32_t
mavlink_msg_obs_position_get_alt
(
const
mavlink_message_t
*
msg
)
{
return
_MAV_RETURN_int32_t
(
msg
,
8
);
}
/**
* @brief Decode a obs_position message into a struct
*
* @param msg The message to decode
* @param obs_position C-struct to decode the message contents into
*/
static
inline
void
mavlink_msg_obs_position_decode
(
const
mavlink_message_t
*
msg
,
mavlink_obs_position_t
*
obs_position
)
{
#if MAVLINK_NEED_BYTE_SWAP
obs_position
->
lon
=
mavlink_msg_obs_position_get_lon
(
msg
);
obs_position
->
lat
=
mavlink_msg_obs_position_get_lat
(
msg
);
obs_position
->
alt
=
mavlink_msg_obs_position_get_alt
(
msg
);
#else
memcpy
(
obs_position
,
_MAV_PAYLOAD
(
msg
),
12
);
#endif
}
thirdParty/mavlink/include/sensesoar/mavlink_msg_obs_qff.h
deleted
100644 → 0
View file @
85240f3c
// MESSAGE OBS_QFF PACKING
#define MAVLINK_MSG_ID_OBS_QFF 182
typedef
struct
__mavlink_obs_qff_t
{
float
qff
;
///< Wind
}
mavlink_obs_qff_t
;
#define MAVLINK_MSG_ID_OBS_QFF_LEN 4
#define MAVLINK_MSG_ID_182_LEN 4
#define MAVLINK_MESSAGE_INFO_OBS_QFF { \
"OBS_QFF", \
1, \
{ { "qff", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_obs_qff_t, qff) }, \
} \
}
/**
* @brief Pack a obs_qff message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param qff Wind
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_obs_qff_pack
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
float
qff
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
4
];
_mav_put_float
(
buf
,
0
,
qff
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
4
);
#else
mavlink_obs_qff_t
packet
;
packet
.
qff
=
qff
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
4
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_OBS_QFF
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
4
,
24
);
}
/**
* @brief Pack a obs_qff message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param qff Wind
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_obs_qff_pack_chan
(
uint8_t
system_id
,
uint8_t
component_id
,
uint8_t
chan
,
mavlink_message_t
*
msg
,
float
qff
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
4
];
_mav_put_float
(
buf
,
0
,
qff
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
4
);
#else
mavlink_obs_qff_t
packet
;
packet
.
qff
=
qff
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
4
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_OBS_QFF
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
4
,
24
);
}
/**
* @brief Encode a obs_qff struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param obs_qff C-struct to read the message contents from
*/
static
inline
uint16_t
mavlink_msg_obs_qff_encode
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
const
mavlink_obs_qff_t
*
obs_qff
)
{
return
mavlink_msg_obs_qff_pack
(
system_id
,
component_id
,
msg
,
obs_qff
->
qff
);
}
/**
* @brief Send a obs_qff message
* @param chan MAVLink channel to send the message
*
* @param qff Wind
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static
inline
void
mavlink_msg_obs_qff_send
(
mavlink_channel_t
chan
,
float
qff
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
4
];
_mav_put_float
(
buf
,
0
,
qff
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_OBS_QFF
,
buf
,
4
,
24
);
#else
mavlink_obs_qff_t
packet
;
packet
.
qff
=
qff
;
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_OBS_QFF
,
(
const
char
*
)
&
packet
,
4
,
24
);
#endif
}
#endif
// MESSAGE OBS_QFF UNPACKING
/**
* @brief Get field qff from obs_qff message
*
* @return Wind
*/
static
inline
float
mavlink_msg_obs_qff_get_qff
(
const
mavlink_message_t
*
msg
)
{
return
_MAV_RETURN_float
(
msg
,
0
);
}
/**
* @brief Decode a obs_qff message into a struct
*
* @param msg The message to decode
* @param obs_qff C-struct to decode the message contents into
*/
static
inline
void
mavlink_msg_obs_qff_decode
(
const
mavlink_message_t
*
msg
,
mavlink_obs_qff_t
*
obs_qff
)
{
#if MAVLINK_NEED_BYTE_SWAP
obs_qff
->
qff
=
mavlink_msg_obs_qff_get_qff
(
msg
);
#else
memcpy
(
obs_qff
,
_MAV_PAYLOAD
(
msg
),
4
);
#endif
}
thirdParty/mavlink/include/sensesoar/mavlink_msg_obs_velocity.h
deleted
100644 → 0
View file @
85240f3c
// MESSAGE OBS_VELOCITY PACKING
#define MAVLINK_MSG_ID_OBS_VELOCITY 172
typedef
struct
__mavlink_obs_velocity_t
{
float
vel
[
3
];
///< Velocity
}
mavlink_obs_velocity_t
;
#define MAVLINK_MSG_ID_OBS_VELOCITY_LEN 12
#define MAVLINK_MSG_ID_172_LEN 12
#define MAVLINK_MSG_OBS_VELOCITY_FIELD_VEL_LEN 3
#define MAVLINK_MESSAGE_INFO_OBS_VELOCITY { \
"OBS_VELOCITY", \
1, \
{ { "vel", NULL, MAVLINK_TYPE_FLOAT, 3, 0, offsetof(mavlink_obs_velocity_t, vel) }, \
} \
}
/**
* @brief Pack a obs_velocity message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param vel Velocity
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_obs_velocity_pack
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
const
float
*
vel
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
12
];
_mav_put_float_array
(
buf
,
0
,
vel
,
3
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
12
);
#else
mavlink_obs_velocity_t
packet
;
mav_array_memcpy
(
packet
.
vel
,
vel
,
sizeof
(
float
)
*
3
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
12
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_OBS_VELOCITY
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
12
,
108
);
}
/**
* @brief Pack a obs_velocity message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param vel Velocity
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_obs_velocity_pack_chan
(
uint8_t
system_id
,
uint8_t
component_id
,
uint8_t
chan
,
mavlink_message_t
*
msg
,
const
float
*
vel
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
12
];
_mav_put_float_array
(
buf
,
0
,
vel
,
3
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
12
);
#else
mavlink_obs_velocity_t
packet
;
mav_array_memcpy
(
packet
.
vel
,
vel
,
sizeof
(
float
)
*
3
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
12
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_OBS_VELOCITY
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
12
,
108
);
}
/**
* @brief Encode a obs_velocity struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param obs_velocity C-struct to read the message contents from
*/
static
inline
uint16_t
mavlink_msg_obs_velocity_encode
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
const
mavlink_obs_velocity_t
*
obs_velocity
)
{
return
mavlink_msg_obs_velocity_pack
(
system_id
,
component_id
,
msg
,
obs_velocity
->
vel
);
}
/**
* @brief Send a obs_velocity message
* @param chan MAVLink channel to send the message
*
* @param vel Velocity
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static
inline
void
mavlink_msg_obs_velocity_send
(
mavlink_channel_t
chan
,
const
float
*
vel
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
12
];
_mav_put_float_array
(
buf
,
0
,
vel
,
3
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_OBS_VELOCITY
,
buf
,
12
,
108
);
#else
mavlink_obs_velocity_t
packet
;
mav_array_memcpy
(
packet
.
vel
,
vel
,
sizeof
(
float
)
*
3
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_OBS_VELOCITY
,
(
const
char
*
)
&
packet
,
12
,
108
);
#endif
}
#endif
// MESSAGE OBS_VELOCITY UNPACKING
/**
* @brief Get field vel from obs_velocity message
*
* @return Velocity
*/
static
inline
uint16_t
mavlink_msg_obs_velocity_get_vel
(
const
mavlink_message_t
*
msg
,
float
*
vel
)
{
return
_MAV_RETURN_float_array
(
msg
,
vel
,
3
,
0
);
}
/**
* @brief Decode a obs_velocity message into a struct
*
* @param msg The message to decode
* @param obs_velocity C-struct to decode the message contents into
*/
static
inline
void
mavlink_msg_obs_velocity_decode
(
const
mavlink_message_t
*
msg
,
mavlink_obs_velocity_t
*
obs_velocity
)
{
#if MAVLINK_NEED_BYTE_SWAP
mavlink_msg_obs_velocity_get_vel
(
msg
,
obs_velocity
->
vel
);
#else
memcpy
(
obs_velocity
,
_MAV_PAYLOAD
(
msg
),
12
);
#endif
}
thirdParty/mavlink/include/sensesoar/mavlink_msg_obs_wind.h
deleted
100644 → 0
View file @
85240f3c
// MESSAGE OBS_WIND PACKING
#define MAVLINK_MSG_ID_OBS_WIND 176
typedef
struct
__mavlink_obs_wind_t
{
float
wind
[
3
];
///< Wind
}
mavlink_obs_wind_t
;
#define MAVLINK_MSG_ID_OBS_WIND_LEN 12
#define MAVLINK_MSG_ID_176_LEN 12
#define MAVLINK_MSG_OBS_WIND_FIELD_WIND_LEN 3
#define MAVLINK_MESSAGE_INFO_OBS_WIND { \
"OBS_WIND", \
1, \
{ { "wind", NULL, MAVLINK_TYPE_FLOAT, 3, 0, offsetof(mavlink_obs_wind_t, wind) }, \
} \
}
/**
* @brief Pack a obs_wind message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param wind Wind
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_obs_wind_pack
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
const
float
*
wind
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
12
];
_mav_put_float_array
(
buf
,
0
,
wind
,
3
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
12
);
#else
mavlink_obs_wind_t
packet
;
mav_array_memcpy
(
packet
.
wind
,
wind
,
sizeof
(
float
)
*
3
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
12
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_OBS_WIND
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
12
,
16
);
}
/**
* @brief Pack a obs_wind message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param wind Wind
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_obs_wind_pack_chan
(
uint8_t
system_id
,
uint8_t
component_id
,
uint8_t
chan
,
mavlink_message_t
*
msg
,
const
float
*
wind
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
12
];
_mav_put_float_array
(
buf
,
0
,
wind
,
3
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
12
);
#else
mavlink_obs_wind_t
packet
;
mav_array_memcpy
(
packet
.
wind
,
wind
,
sizeof
(
float
)
*
3
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
12
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_OBS_WIND
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
12
,
16
);
}
/**
* @brief Encode a obs_wind struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param obs_wind C-struct to read the message contents from
*/
static
inline
uint16_t
mavlink_msg_obs_wind_encode
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
const
mavlink_obs_wind_t
*
obs_wind
)
{
return
mavlink_msg_obs_wind_pack
(
system_id
,
component_id
,
msg
,
obs_wind
->
wind
);
}
/**
* @brief Send a obs_wind message
* @param chan MAVLink channel to send the message
*
* @param wind Wind
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static
inline
void
mavlink_msg_obs_wind_send
(
mavlink_channel_t
chan
,
const
float
*
wind
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
12
];
_mav_put_float_array
(
buf
,
0
,
wind
,
3
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_OBS_WIND
,
buf
,
12
,
16
);
#else
mavlink_obs_wind_t
packet
;
mav_array_memcpy
(
packet
.
wind
,
wind
,
sizeof
(
float
)
*
3
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_OBS_WIND
,
(
const
char
*
)
&
packet
,
12
,
16
);
#endif
}
#endif
// MESSAGE OBS_WIND UNPACKING
/**
* @brief Get field wind from obs_wind message
*
* @return Wind
*/
static
inline
uint16_t
mavlink_msg_obs_wind_get_wind
(
const
mavlink_message_t
*
msg
,
float
*
wind
)
{
return
_MAV_RETURN_float_array
(
msg
,
wind
,
3
,
0
);
}
/**
* @brief Decode a obs_wind message into a struct
*
* @param msg The message to decode
* @param obs_wind C-struct to decode the message contents into
*/
static
inline
void
mavlink_msg_obs_wind_decode
(
const
mavlink_message_t
*
msg
,
mavlink_obs_wind_t
*
obs_wind
)
{
#if MAVLINK_NEED_BYTE_SWAP
mavlink_msg_obs_wind_get_wind
(
msg
,
obs_wind
->
wind
);
#else
memcpy
(
obs_wind
,
_MAV_PAYLOAD
(
msg
),
12
);
#endif
}
thirdParty/mavlink/include/sensesoar/mavlink_msg_pm_elec.h
deleted
100644 → 0
View file @
85240f3c
// MESSAGE PM_ELEC PACKING
#define MAVLINK_MSG_ID_PM_ELEC 188
typedef
struct
__mavlink_pm_elec_t
{
float
PwCons
;
///< current power consumption
float
BatStat
;
///< battery status
float
PwGen
[
3
];
///< Power generation from each module
}
mavlink_pm_elec_t
;
#define MAVLINK_MSG_ID_PM_ELEC_LEN 20
#define MAVLINK_MSG_ID_188_LEN 20
#define MAVLINK_MSG_PM_ELEC_FIELD_PWGEN_LEN 3
#define MAVLINK_MESSAGE_INFO_PM_ELEC { \
"PM_ELEC", \
3, \
{ { "PwCons", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_pm_elec_t, PwCons) }, \
{ "BatStat", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_pm_elec_t, BatStat) }, \
{ "PwGen", NULL, MAVLINK_TYPE_FLOAT, 3, 8, offsetof(mavlink_pm_elec_t, PwGen) }, \
} \
}
/**
* @brief Pack a pm_elec message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param PwCons current power consumption
* @param BatStat battery status
* @param PwGen Power generation from each module
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_pm_elec_pack
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
float
PwCons
,
float
BatStat
,
const
float
*
PwGen
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
20
];
_mav_put_float
(
buf
,
0
,
PwCons
);
_mav_put_float
(
buf
,
4
,
BatStat
);
_mav_put_float_array
(
buf
,
8
,
PwGen
,
3
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
20
);
#else
mavlink_pm_elec_t
packet
;
packet
.
PwCons
=
PwCons
;
packet
.
BatStat
=
BatStat
;
mav_array_memcpy
(
packet
.
PwGen
,
PwGen
,
sizeof
(
float
)
*
3
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
20
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_PM_ELEC
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
20
,
170
);
}
/**
* @brief Pack a pm_elec message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param PwCons current power consumption
* @param BatStat battery status
* @param PwGen Power generation from each module
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_pm_elec_pack_chan
(
uint8_t
system_id
,
uint8_t
component_id
,
uint8_t
chan
,
mavlink_message_t
*
msg
,
float
PwCons
,
float
BatStat
,
const
float
*
PwGen
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
20
];
_mav_put_float
(
buf
,
0
,
PwCons
);
_mav_put_float
(
buf
,
4
,
BatStat
);
_mav_put_float_array
(
buf
,
8
,
PwGen
,
3
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
20
);
#else
mavlink_pm_elec_t
packet
;
packet
.
PwCons
=
PwCons
;
packet
.
BatStat
=
BatStat
;
mav_array_memcpy
(
packet
.
PwGen
,
PwGen
,
sizeof
(
float
)
*
3
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
20
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_PM_ELEC
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
20
,
170
);
}
/**
* @brief Encode a pm_elec struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param pm_elec C-struct to read the message contents from
*/
static
inline
uint16_t
mavlink_msg_pm_elec_encode
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
const
mavlink_pm_elec_t
*
pm_elec
)
{
return
mavlink_msg_pm_elec_pack
(
system_id
,
component_id
,
msg
,
pm_elec
->
PwCons
,
pm_elec
->
BatStat
,
pm_elec
->
PwGen
);
}
/**
* @brief Send a pm_elec message
* @param chan MAVLink channel to send the message
*
* @param PwCons current power consumption
* @param BatStat battery status
* @param PwGen Power generation from each module
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static
inline
void
mavlink_msg_pm_elec_send
(
mavlink_channel_t
chan
,
float
PwCons
,
float
BatStat
,
const
float
*
PwGen
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
20
];
_mav_put_float
(
buf
,
0
,
PwCons
);
_mav_put_float
(
buf
,
4
,
BatStat
);
_mav_put_float_array
(
buf
,
8
,
PwGen
,
3
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_PM_ELEC
,
buf
,
20
,
170
);
#else
mavlink_pm_elec_t
packet
;
packet
.
PwCons
=
PwCons
;
packet
.
BatStat
=
BatStat
;
mav_array_memcpy
(
packet
.
PwGen
,
PwGen
,
sizeof
(
float
)
*
3
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_PM_ELEC
,
(
const
char
*
)
&
packet
,
20
,
170
);
#endif
}
#endif
// MESSAGE PM_ELEC UNPACKING
/**
* @brief Get field PwCons from pm_elec message
*
* @return current power consumption
*/
static
inline
float
mavlink_msg_pm_elec_get_PwCons
(
const
mavlink_message_t
*
msg
)
{
return
_MAV_RETURN_float
(
msg
,
0
);
}
/**
* @brief Get field BatStat from pm_elec message
*
* @return battery status
*/
static
inline
float
mavlink_msg_pm_elec_get_BatStat
(
const
mavlink_message_t
*
msg
)
{
return
_MAV_RETURN_float
(
msg
,
4
);
}
/**
* @brief Get field PwGen from pm_elec message
*
* @return Power generation from each module
*/
static
inline
uint16_t
mavlink_msg_pm_elec_get_PwGen
(
const
mavlink_message_t
*
msg
,
float
*
PwGen
)
{
return
_MAV_RETURN_float_array
(
msg
,
PwGen
,
3
,
8
);
}
/**
* @brief Decode a pm_elec message into a struct
*
* @param msg The message to decode
* @param pm_elec C-struct to decode the message contents into
*/
static
inline
void
mavlink_msg_pm_elec_decode
(
const
mavlink_message_t
*
msg
,
mavlink_pm_elec_t
*
pm_elec
)
{
#if MAVLINK_NEED_BYTE_SWAP
pm_elec
->
PwCons
=
mavlink_msg_pm_elec_get_PwCons
(
msg
);
pm_elec
->
BatStat
=
mavlink_msg_pm_elec_get_BatStat
(
msg
);
mavlink_msg_pm_elec_get_PwGen
(
msg
,
pm_elec
->
PwGen
);
#else
memcpy
(
pm_elec
,
_MAV_PAYLOAD
(
msg
),
20
);
#endif
}
thirdParty/mavlink/include/sensesoar/mavlink_msg_sys_stat.h
deleted
100644 → 0
View file @
85240f3c
// MESSAGE SYS_Stat PACKING
#define MAVLINK_MSG_ID_SYS_Stat 190
typedef
struct
__mavlink_sys_stat_t
{
uint8_t
gps
;
///< gps status
uint8_t
act
;
///< actuator status
uint8_t
mod
;
///< module status
uint8_t
commRssi
;
///< module status
}
mavlink_sys_stat_t
;
#define MAVLINK_MSG_ID_SYS_Stat_LEN 4
#define MAVLINK_MSG_ID_190_LEN 4
#define MAVLINK_MESSAGE_INFO_SYS_Stat { \
"SYS_Stat", \
4, \
{ { "gps", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_sys_stat_t, gps) }, \
{ "act", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_sys_stat_t, act) }, \
{ "mod", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_sys_stat_t, mod) }, \
{ "commRssi", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_sys_stat_t, commRssi) }, \
} \
}
/**
* @brief Pack a sys_stat message
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
*
* @param gps gps status
* @param act actuator status
* @param mod module status
* @param commRssi module status
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_sys_stat_pack
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
uint8_t
gps
,
uint8_t
act
,
uint8_t
mod
,
uint8_t
commRssi
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
4
];
_mav_put_uint8_t
(
buf
,
0
,
gps
);
_mav_put_uint8_t
(
buf
,
1
,
act
);
_mav_put_uint8_t
(
buf
,
2
,
mod
);
_mav_put_uint8_t
(
buf
,
3
,
commRssi
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
4
);
#else
mavlink_sys_stat_t
packet
;
packet
.
gps
=
gps
;
packet
.
act
=
act
;
packet
.
mod
=
mod
;
packet
.
commRssi
=
commRssi
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
4
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_SYS_Stat
;
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
4
,
157
);
}
/**
* @brief Pack a sys_stat message on a channel
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param gps gps status
* @param act actuator status
* @param mod module status
* @param commRssi module status
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_sys_stat_pack_chan
(
uint8_t
system_id
,
uint8_t
component_id
,
uint8_t
chan
,
mavlink_message_t
*
msg
,
uint8_t
gps
,
uint8_t
act
,
uint8_t
mod
,
uint8_t
commRssi
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
4
];
_mav_put_uint8_t
(
buf
,
0
,
gps
);
_mav_put_uint8_t
(
buf
,
1
,
act
);
_mav_put_uint8_t
(
buf
,
2
,
mod
);
_mav_put_uint8_t
(
buf
,
3
,
commRssi
);
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
buf
,
4
);
#else
mavlink_sys_stat_t
packet
;
packet
.
gps
=
gps
;
packet
.
act
=
act
;
packet
.
mod
=
mod
;
packet
.
commRssi
=
commRssi
;
memcpy
(
_MAV_PAYLOAD_NON_CONST
(
msg
),
&
packet
,
4
);
#endif
msg
->
msgid
=
MAVLINK_MSG_ID_SYS_Stat
;
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
4
,
157
);
}
/**
* @brief Encode a sys_stat struct into a message
*
* @param system_id ID of this system
* @param component_id ID of this component (e.g. 200 for IMU)
* @param msg The MAVLink message to compress the data into
* @param sys_stat C-struct to read the message contents from
*/
static
inline
uint16_t
mavlink_msg_sys_stat_encode
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
const
mavlink_sys_stat_t
*
sys_stat
)
{
return
mavlink_msg_sys_stat_pack
(
system_id
,
component_id
,
msg
,
sys_stat
->
gps
,
sys_stat
->
act
,
sys_stat
->
mod
,
sys_stat
->
commRssi
);
}
/**
* @brief Send a sys_stat message
* @param chan MAVLink channel to send the message
*
* @param gps gps status
* @param act actuator status
* @param mod module status
* @param commRssi module status
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static
inline
void
mavlink_msg_sys_stat_send
(
mavlink_channel_t
chan
,
uint8_t
gps
,
uint8_t
act
,
uint8_t
mod
,
uint8_t
commRssi
)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
char
buf
[
4
];
_mav_put_uint8_t
(
buf
,
0
,
gps
);
_mav_put_uint8_t
(
buf
,
1
,
act
);
_mav_put_uint8_t
(
buf
,
2
,
mod
);
_mav_put_uint8_t
(
buf
,
3
,
commRssi
);
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_SYS_Stat
,
buf
,
4
,
157
);
#else
mavlink_sys_stat_t
packet
;
packet
.
gps
=
gps
;
packet
.
act
=
act
;
packet
.
mod
=
mod
;
packet
.
commRssi
=
commRssi
;
_mav_finalize_message_chan_send
(
chan
,
MAVLINK_MSG_ID_SYS_Stat
,
(
const
char
*
)
&
packet
,
4
,
157
);
#endif
}
#endif
// MESSAGE SYS_Stat UNPACKING
/**
* @brief Get field gps from sys_stat message
*
* @return gps status
*/
static
inline
uint8_t
mavlink_msg_sys_stat_get_gps
(
const
mavlink_message_t
*
msg
)
{
return
_MAV_RETURN_uint8_t
(
msg
,
0
);
}
/**
* @brief Get field act from sys_stat message
*
* @return actuator status
*/
static
inline
uint8_t
mavlink_msg_sys_stat_get_act
(
const
mavlink_message_t
*
msg
)
{
return
_MAV_RETURN_uint8_t
(
msg
,
1
);
}
/**
* @brief Get field mod from sys_stat message
*
* @return module status
*/
static
inline
uint8_t
mavlink_msg_sys_stat_get_mod
(
const
mavlink_message_t
*
msg
)
{
return
_MAV_RETURN_uint8_t
(
msg
,
2
);
}
/**
* @brief Get field commRssi from sys_stat message
*
* @return module status
*/
static
inline
uint8_t
mavlink_msg_sys_stat_get_commRssi
(
const
mavlink_message_t
*
msg
)
{
return
_MAV_RETURN_uint8_t
(
msg
,
3
);
}
/**
* @brief Decode a sys_stat message into a struct
*
* @param msg The message to decode
* @param sys_stat C-struct to decode the message contents into
*/
static
inline
void
mavlink_msg_sys_stat_decode
(
const
mavlink_message_t
*
msg
,
mavlink_sys_stat_t
*
sys_stat
)
{
#if MAVLINK_NEED_BYTE_SWAP
sys_stat
->
gps
=
mavlink_msg_sys_stat_get_gps
(
msg
);
sys_stat
->
act
=
mavlink_msg_sys_stat_get_act
(
msg
);
sys_stat
->
mod
=
mavlink_msg_sys_stat_get_mod
(
msg
);
sys_stat
->
commRssi
=
mavlink_msg_sys_stat_get_commRssi
(
msg
);
#else
memcpy
(
sys_stat
,
_MAV_PAYLOAD
(
msg
),
4
);
#endif
}
thirdParty/mavlink/include/sensesoar/sensesoar.h
deleted
100644 → 0
View file @
85240f3c
This diff is collapsed.
Click to expand it.
thirdParty/mavlink/message_definitions/sensesoar.xml
deleted
100644 → 0
View file @
85240f3c
<?xml version='1.0'?>
<mavlink>
<include>
common.xml
</include>
<enums>
<enum
name=
"SENSESOAR_MODE"
>
<description>
Different flight modes
</description>
<entry
name=
"SENSESOAR_MODE_GLIDING"
>
Gliding mode with motors off
</entry>
<entry
name=
"SENSESOAR_MODE_AUTONOMOUS"
>
Autonomous flight
</entry>
<entry
name=
"SENSESOAR_MODE_MANUAL"
>
RC controlled
</entry>
</enum>
</enums>
<messages>
<message
id=
"170"
name=
"OBS_POSITION"
>
Position estimate of the observer in global frame
<field
type=
"int32_t"
name=
"lon"
>
Longitude expressed in 1E7
</field>
<field
type=
"int32_t"
name=
"lat"
>
Latitude expressed in 1E7
</field>
<field
type=
"int32_t"
name=
"alt"
>
Altitude expressed in milimeters
</field>
</message>
<message
id=
"172"
name=
"OBS_VELOCITY"
>
velocity estimate of the observer in NED inertial frame
<field
type=
"float[3]"
name=
"vel"
>
Velocity
</field>
</message>
<message
id=
"174"
name=
"OBS_ATTITUDE"
>
attitude estimate of the observer
<field
type=
"double[4]"
name=
"quat"
>
Quaternion re;im
</field>
</message>
<message
id=
"176"
name=
"OBS_WIND"
>
Wind estimate in NED inertial frame
<field
type=
"float[3]"
name=
"wind"
>
Wind
</field>
</message>
<message
id=
"178"
name=
"OBS_AIR_VELOCITY"
>
Estimate of the air velocity
<field
type=
"float"
name=
"magnitude"
>
Air speed
</field>
<field
type=
"float"
name=
"aoa"
>
angle of attack
</field>
<field
type=
"float"
name=
"slip"
>
slip angle
</field>
</message>
<message
id=
"180"
name=
"OBS_BIAS"
>
IMU biases
<field
type=
"float[3]"
name=
"accBias"
>
accelerometer bias
</field>
<field
type=
"float[3]"
name=
"gyroBias"
>
gyroscope bias
</field>
</message>
<message
id=
"182"
name=
"OBS_QFF"
>
estimate of the pressure at sea level
<field
type=
"float"
name=
"qff"
>
Wind
</field>
</message>
<message
id=
"183"
name=
"OBS_AIR_TEMP"
>
ambient air temperature
<field
type=
"float"
name=
"airT"
>
Air Temperatur
</field>
</message>
<message
id=
"184"
name=
"FILT_ROT_VEL"
>
filtered rotational velocity
<field
type=
"float[3]"
name=
"rotVel"
>
rotational velocity
</field>
</message>
<message
id=
"186"
name=
"LLC_OUT"
>
low level control output
<field
type=
"int16_t[4]"
name=
"servoOut"
>
Servo signal
</field>
<field
type=
"int16_t[2]"
name=
"MotorOut"
>
motor signal
</field>
</message>
<message
id=
"188"
name=
"PM_ELEC"
>
Power managment
<field
type=
"float"
name=
"PwCons"
>
current power consumption
</field>
<field
type=
"float"
name=
"BatStat"
>
battery status
</field>
<field
type=
"float[3]"
name=
"PwGen"
>
Power generation from each module
</field>
</message>
<message
id=
"190"
name=
"SYS_Stat"
>
system status
<field
type=
"uint8_t"
name=
"gps"
>
gps status
</field>
<field
type=
"uint8_t"
name=
"act"
>
actuator status
</field>
<field
type=
"uint8_t"
name=
"mod"
>
module status
</field>
<field
type=
"uint8_t"
name=
"commRssi"
>
module status
</field>
</message>
<message
id=
"192"
name=
"CMD_AIRSPEED_CHNG"
>
change commanded air speed
<field
type=
"uint8_t"
name=
"target"
>
Target ID
</field>
<field
type=
"float"
name=
"spCmd"
>
commanded airspeed
</field>
</message>
<message
id=
"194"
name=
"CMD_AIRSPEED_ACK"
>
accept change of airspeed
<field
type=
"float"
name=
"spCmd"
>
commanded airspeed
</field>
<field
type=
"uint8_t"
name=
"ack"
>
0:ack, 1:nack
</field>
</message>
</messages>
</mavlink>
thirdParty/qserialport/include/QtSerialPort/qportsettings.h
View file @
6a760287
...
...
@@ -95,11 +95,8 @@ public:
//BAUDR_76800,
#endif
#ifdef Q_OS_LINUX
BAUDR_230400
,
BAUDR_460800
,
BAUDR_500000
,
BAUDR_576000
,
BAUDR_921600
,
#endif
#ifdef TNX_WINDOWS_SERIAL_PORT
BAUDR_14400
,
...
...
@@ -118,7 +115,10 @@ public:
BAUDR_19200
,
BAUDR_38400
,
BAUDR_57600
,
BAUDR_115200
BAUDR_115200
,
BAUDR_230400
,
BAUDR_460800
,
BAUDR_921600
};
enum
DataBits
{
...
...
@@ -186,11 +186,8 @@ public:
case
BAUDR_256000
:
baudRateInt_
=
256000
;
break
;
#endif
#if defined(Q_OS_LINUX)
case
BAUDR_230400
:
baudRateInt_
=
230400
;
break
;
case
BAUDR_460800
:
baudRateInt_
=
460800
;
break
;
case
BAUDR_500000
:
baudRateInt_
=
500000
;
break
;
case
BAUDR_576000
:
baudRateInt_
=
576000
;
break
;
case
BAUDR_921600
:
baudRateInt_
=
921600
;
break
;
#endif
// baud rates supported by all platforms
case
BAUDR_110
:
baudRateInt_
=
110
;
break
;
...
...
@@ -204,6 +201,9 @@ public:
case
BAUDR_38400
:
baudRateInt_
=
38400
;
break
;
case
BAUDR_57600
:
baudRateInt_
=
57600
;
break
;
case
BAUDR_115200
:
baudRateInt_
=
115200
;
break
;
case
BAUDR_230400
:
baudRateInt_
=
230400
;
break
;
case
BAUDR_460800
:
baudRateInt_
=
460800
;
break
;
case
BAUDR_921600
:
baudRateInt_
=
921600
;
break
;
default:
baudRateInt_
=
0
;
// unknown baudrate
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment