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
ce112d3a
Commit
ce112d3a
authored
Aug 28, 2011
by
lm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prepping merge
parent
b303e674
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
0 additions
and
2299 deletions
+0
-2299
mavlink_msg_attitude_controller_output.h
...k/include/common/mavlink_msg_attitude_controller_output.h
+0
-196
mavlink_msg_cmd_ack.h
thirdParty/mavlink/include/common/mavlink_msg_cmd_ack.h
+0
-141
mavlink_msg_position_controller_output.h
...k/include/common/mavlink_msg_position_controller_output.h
+0
-196
mavlink_msg_roll_pitch_yaw_setpoint.h
...link/include/common/mavlink_msg_roll_pitch_yaw_setpoint.h
+0
-178
mavlink_msg_roll_pitch_yaw_speed_setpoint.h
...nclude/common/mavlink_msg_roll_pitch_yaw_speed_setpoint.h
+0
-178
mavlink_msg_set_roll_pitch_yaw.h
...y/mavlink/include/common/mavlink_msg_set_roll_pitch_yaw.h
+0
-196
mavlink_msg_set_roll_pitch_yaw_speed.h
...ink/include/common/mavlink_msg_set_roll_pitch_yaw_speed.h
+0
-196
documentation.dox
thirdParty/mavlink/include/documentation.dox
+0
-41
mavlink_checksum.h
thirdParty/mavlink/include/mavlink_checksum.h
+0
-183
mavlink_data.h
thirdParty/mavlink/include/mavlink_data.h
+0
-21
mavlink_options.h
thirdParty/mavlink/include/mavlink_options.h
+0
-135
mavlink_protocol.h
thirdParty/mavlink/include/mavlink_protocol.h
+0
-425
mavlink_msg_aux_status.h
thirdParty/mavlink/include/pixhawk/mavlink_msg_aux_status.h
+0
-213
No files found.
thirdParty/mavlink/include/common/mavlink_msg_attitude_controller_output.h
deleted
100644 → 0
View file @
b303e674
// MESSAGE ATTITUDE_CONTROLLER_OUTPUT PACKING
#define MAVLINK_MSG_ID_ATTITUDE_CONTROLLER_OUTPUT 60
#define MAVLINK_MSG_ID_ATTITUDE_CONTROLLER_OUTPUT_LEN 5
#define MAVLINK_MSG_60_LEN 5
typedef
struct
__mavlink_attitude_controller_output_t
{
uint8_t
enabled
;
///< 1: enabled, 0: disabled
int8_t
roll
;
///< Attitude roll: -128: -100%, 127: +100%
int8_t
pitch
;
///< Attitude pitch: -128: -100%, 127: +100%
int8_t
yaw
;
///< Attitude yaw: -128: -100%, 127: +100%
int8_t
thrust
;
///< Attitude thrust: -128: -100%, 127: +100%
}
mavlink_attitude_controller_output_t
;
/**
* @brief Pack a attitude_controller_output 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 enabled 1: enabled, 0: disabled
* @param roll Attitude roll: -128: -100%, 127: +100%
* @param pitch Attitude pitch: -128: -100%, 127: +100%
* @param yaw Attitude yaw: -128: -100%, 127: +100%
* @param thrust Attitude thrust: -128: -100%, 127: +100%
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_attitude_controller_output_pack
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
uint8_t
enabled
,
int8_t
roll
,
int8_t
pitch
,
int8_t
yaw
,
int8_t
thrust
)
{
mavlink_attitude_controller_output_t
*
p
=
(
mavlink_attitude_controller_output_t
*
)
&
msg
->
payload
[
0
];
msg
->
msgid
=
MAVLINK_MSG_ID_ATTITUDE_CONTROLLER_OUTPUT
;
p
->
enabled
=
enabled
;
// uint8_t:1: enabled, 0: disabled
p
->
roll
=
roll
;
// int8_t:Attitude roll: -128: -100%, 127: +100%
p
->
pitch
=
pitch
;
// int8_t:Attitude pitch: -128: -100%, 127: +100%
p
->
yaw
=
yaw
;
// int8_t:Attitude yaw: -128: -100%, 127: +100%
p
->
thrust
=
thrust
;
// int8_t:Attitude thrust: -128: -100%, 127: +100%
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_ATTITUDE_CONTROLLER_OUTPUT_LEN
);
}
/**
* @brief Pack a attitude_controller_output message
* @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 enabled 1: enabled, 0: disabled
* @param roll Attitude roll: -128: -100%, 127: +100%
* @param pitch Attitude pitch: -128: -100%, 127: +100%
* @param yaw Attitude yaw: -128: -100%, 127: +100%
* @param thrust Attitude thrust: -128: -100%, 127: +100%
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_attitude_controller_output_pack_chan
(
uint8_t
system_id
,
uint8_t
component_id
,
uint8_t
chan
,
mavlink_message_t
*
msg
,
uint8_t
enabled
,
int8_t
roll
,
int8_t
pitch
,
int8_t
yaw
,
int8_t
thrust
)
{
mavlink_attitude_controller_output_t
*
p
=
(
mavlink_attitude_controller_output_t
*
)
&
msg
->
payload
[
0
];
msg
->
msgid
=
MAVLINK_MSG_ID_ATTITUDE_CONTROLLER_OUTPUT
;
p
->
enabled
=
enabled
;
// uint8_t:1: enabled, 0: disabled
p
->
roll
=
roll
;
// int8_t:Attitude roll: -128: -100%, 127: +100%
p
->
pitch
=
pitch
;
// int8_t:Attitude pitch: -128: -100%, 127: +100%
p
->
yaw
=
yaw
;
// int8_t:Attitude yaw: -128: -100%, 127: +100%
p
->
thrust
=
thrust
;
// int8_t:Attitude thrust: -128: -100%, 127: +100%
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_ATTITUDE_CONTROLLER_OUTPUT_LEN
);
}
/**
* @brief Encode a attitude_controller_output 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 attitude_controller_output C-struct to read the message contents from
*/
static
inline
uint16_t
mavlink_msg_attitude_controller_output_encode
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
const
mavlink_attitude_controller_output_t
*
attitude_controller_output
)
{
return
mavlink_msg_attitude_controller_output_pack
(
system_id
,
component_id
,
msg
,
attitude_controller_output
->
enabled
,
attitude_controller_output
->
roll
,
attitude_controller_output
->
pitch
,
attitude_controller_output
->
yaw
,
attitude_controller_output
->
thrust
);
}
/**
* @brief Send a attitude_controller_output message
* @param chan MAVLink channel to send the message
*
* @param enabled 1: enabled, 0: disabled
* @param roll Attitude roll: -128: -100%, 127: +100%
* @param pitch Attitude pitch: -128: -100%, 127: +100%
* @param yaw Attitude yaw: -128: -100%, 127: +100%
* @param thrust Attitude thrust: -128: -100%, 127: +100%
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static
inline
void
mavlink_msg_attitude_controller_output_send
(
mavlink_channel_t
chan
,
uint8_t
enabled
,
int8_t
roll
,
int8_t
pitch
,
int8_t
yaw
,
int8_t
thrust
)
{
mavlink_header_t
hdr
;
mavlink_attitude_controller_output_t
payload
;
uint16_t
checksum
;
mavlink_attitude_controller_output_t
*
p
=
&
payload
;
p
->
enabled
=
enabled
;
// uint8_t:1: enabled, 0: disabled
p
->
roll
=
roll
;
// int8_t:Attitude roll: -128: -100%, 127: +100%
p
->
pitch
=
pitch
;
// int8_t:Attitude pitch: -128: -100%, 127: +100%
p
->
yaw
=
yaw
;
// int8_t:Attitude yaw: -128: -100%, 127: +100%
p
->
thrust
=
thrust
;
// int8_t:Attitude thrust: -128: -100%, 127: +100%
hdr
.
STX
=
MAVLINK_STX
;
hdr
.
len
=
MAVLINK_MSG_ID_ATTITUDE_CONTROLLER_OUTPUT_LEN
;
hdr
.
msgid
=
MAVLINK_MSG_ID_ATTITUDE_CONTROLLER_OUTPUT
;
hdr
.
sysid
=
mavlink_system
.
sysid
;
hdr
.
compid
=
mavlink_system
.
compid
;
hdr
.
seq
=
mavlink_get_channel_status
(
chan
)
->
current_tx_seq
;
mavlink_get_channel_status
(
chan
)
->
current_tx_seq
=
hdr
.
seq
+
1
;
mavlink_send_mem
(
chan
,
(
uint8_t
*
)
&
hdr
.
STX
,
MAVLINK_NUM_HEADER_BYTES
);
crc_init
(
&
checksum
);
checksum
=
crc_calculate_mem
((
uint8_t
*
)
&
hdr
.
len
,
&
checksum
,
MAVLINK_CORE_HEADER_LEN
);
checksum
=
crc_calculate_mem
((
uint8_t
*
)
&
payload
,
&
checksum
,
hdr
.
len
);
hdr
.
ck_a
=
(
uint8_t
)(
checksum
&
0xFF
);
///< Low byte
hdr
.
ck_b
=
(
uint8_t
)(
checksum
>>
8
);
///< High byte
mavlink_send_mem
(
chan
,
(
uint8_t
*
)
&
payload
,
hdr
.
len
);
mavlink_send_mem
(
chan
,
(
uint8_t
*
)
&
hdr
.
ck_a
,
MAVLINK_NUM_CHECKSUM_BYTES
);
}
#endif
// MESSAGE ATTITUDE_CONTROLLER_OUTPUT UNPACKING
/**
* @brief Get field enabled from attitude_controller_output message
*
* @return 1: enabled, 0: disabled
*/
static
inline
uint8_t
mavlink_msg_attitude_controller_output_get_enabled
(
const
mavlink_message_t
*
msg
)
{
mavlink_attitude_controller_output_t
*
p
=
(
mavlink_attitude_controller_output_t
*
)
&
msg
->
payload
[
0
];
return
(
uint8_t
)(
p
->
enabled
);
}
/**
* @brief Get field roll from attitude_controller_output message
*
* @return Attitude roll: -128: -100%, 127: +100%
*/
static
inline
int8_t
mavlink_msg_attitude_controller_output_get_roll
(
const
mavlink_message_t
*
msg
)
{
mavlink_attitude_controller_output_t
*
p
=
(
mavlink_attitude_controller_output_t
*
)
&
msg
->
payload
[
0
];
return
(
int8_t
)(
p
->
roll
);
}
/**
* @brief Get field pitch from attitude_controller_output message
*
* @return Attitude pitch: -128: -100%, 127: +100%
*/
static
inline
int8_t
mavlink_msg_attitude_controller_output_get_pitch
(
const
mavlink_message_t
*
msg
)
{
mavlink_attitude_controller_output_t
*
p
=
(
mavlink_attitude_controller_output_t
*
)
&
msg
->
payload
[
0
];
return
(
int8_t
)(
p
->
pitch
);
}
/**
* @brief Get field yaw from attitude_controller_output message
*
* @return Attitude yaw: -128: -100%, 127: +100%
*/
static
inline
int8_t
mavlink_msg_attitude_controller_output_get_yaw
(
const
mavlink_message_t
*
msg
)
{
mavlink_attitude_controller_output_t
*
p
=
(
mavlink_attitude_controller_output_t
*
)
&
msg
->
payload
[
0
];
return
(
int8_t
)(
p
->
yaw
);
}
/**
* @brief Get field thrust from attitude_controller_output message
*
* @return Attitude thrust: -128: -100%, 127: +100%
*/
static
inline
int8_t
mavlink_msg_attitude_controller_output_get_thrust
(
const
mavlink_message_t
*
msg
)
{
mavlink_attitude_controller_output_t
*
p
=
(
mavlink_attitude_controller_output_t
*
)
&
msg
->
payload
[
0
];
return
(
int8_t
)(
p
->
thrust
);
}
/**
* @brief Decode a attitude_controller_output message into a struct
*
* @param msg The message to decode
* @param attitude_controller_output C-struct to decode the message contents into
*/
static
inline
void
mavlink_msg_attitude_controller_output_decode
(
const
mavlink_message_t
*
msg
,
mavlink_attitude_controller_output_t
*
attitude_controller_output
)
{
memcpy
(
attitude_controller_output
,
msg
->
payload
,
sizeof
(
mavlink_attitude_controller_output_t
));
}
thirdParty/mavlink/include/common/mavlink_msg_cmd_ack.h
deleted
100644 → 0
View file @
b303e674
// MESSAGE CMD_ACK PACKING
#define MAVLINK_MSG_ID_CMD_ACK 9
#define MAVLINK_MSG_ID_CMD_ACK_LEN 2
#define MAVLINK_MSG_9_LEN 2
#define MAVLINK_MSG_ID_CMD_ACK_KEY 0x90
#define MAVLINK_MSG_9_KEY 0x90
typedef
struct
__mavlink_cmd_ack_t
{
uint8_t
cmd
;
///< The MAV_CMD ID
uint8_t
result
;
///< 0: Action DENIED, 1: Action executed
}
mavlink_cmd_ack_t
;
/**
* @brief Pack a cmd_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 cmd The MAV_CMD ID
* @param result 0: Action DENIED, 1: Action executed
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_cmd_ack_pack
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
uint8_t
cmd
,
uint8_t
result
)
{
mavlink_cmd_ack_t
*
p
=
(
mavlink_cmd_ack_t
*
)
&
msg
->
payload
[
0
];
msg
->
msgid
=
MAVLINK_MSG_ID_CMD_ACK
;
p
->
cmd
=
cmd
;
// uint8_t:The MAV_CMD ID
p
->
result
=
result
;
// uint8_t:0: Action DENIED, 1: Action executed
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_CMD_ACK_LEN
);
}
/**
* @brief Pack a cmd_ack message
* @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 cmd The MAV_CMD ID
* @param result 0: Action DENIED, 1: Action executed
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_cmd_ack_pack_chan
(
uint8_t
system_id
,
uint8_t
component_id
,
uint8_t
chan
,
mavlink_message_t
*
msg
,
uint8_t
cmd
,
uint8_t
result
)
{
mavlink_cmd_ack_t
*
p
=
(
mavlink_cmd_ack_t
*
)
&
msg
->
payload
[
0
];
msg
->
msgid
=
MAVLINK_MSG_ID_CMD_ACK
;
p
->
cmd
=
cmd
;
// uint8_t:The MAV_CMD ID
p
->
result
=
result
;
// uint8_t:0: Action DENIED, 1: Action executed
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_CMD_ACK_LEN
);
}
/**
* @brief Encode a cmd_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_ack C-struct to read the message contents from
*/
static
inline
uint16_t
mavlink_msg_cmd_ack_encode
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
const
mavlink_cmd_ack_t
*
cmd_ack
)
{
return
mavlink_msg_cmd_ack_pack
(
system_id
,
component_id
,
msg
,
cmd_ack
->
cmd
,
cmd_ack
->
result
);
}
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
/**
* @brief Send a cmd_ack message
* @param chan MAVLink channel to send the message
*
* @param cmd The MAV_CMD ID
* @param result 0: Action DENIED, 1: Action executed
*/
static
inline
void
mavlink_msg_cmd_ack_send
(
mavlink_channel_t
chan
,
uint8_t
cmd
,
uint8_t
result
)
{
mavlink_header_t
hdr
;
mavlink_cmd_ack_t
payload
;
MAVLINK_BUFFER_CHECK_START
(
chan
,
MAVLINK_MSG_ID_CMD_ACK_LEN
)
payload
.
cmd
=
cmd
;
// uint8_t:The MAV_CMD ID
payload
.
result
=
result
;
// uint8_t:0: Action DENIED, 1: Action executed
hdr
.
STX
=
MAVLINK_STX
;
hdr
.
len
=
MAVLINK_MSG_ID_CMD_ACK_LEN
;
hdr
.
msgid
=
MAVLINK_MSG_ID_CMD_ACK
;
hdr
.
sysid
=
mavlink_system
.
sysid
;
hdr
.
compid
=
mavlink_system
.
compid
;
hdr
.
seq
=
mavlink_get_channel_status
(
chan
)
->
current_tx_seq
;
mavlink_get_channel_status
(
chan
)
->
current_tx_seq
=
hdr
.
seq
+
1
;
mavlink_send_mem
(
chan
,
(
uint8_t
*
)
&
hdr
.
STX
,
MAVLINK_NUM_HEADER_BYTES
);
mavlink_send_mem
(
chan
,
(
uint8_t
*
)
&
payload
,
sizeof
(
payload
)
);
crc_init
(
&
hdr
.
ck
);
crc_calculate_mem
((
uint8_t
*
)
&
hdr
.
len
,
&
hdr
.
ck
,
MAVLINK_CORE_HEADER_LEN
);
crc_calculate_mem
((
uint8_t
*
)
&
payload
,
&
hdr
.
ck
,
hdr
.
len
);
crc_accumulate
(
0x90
,
&
hdr
.
ck
);
/// include key in X25 checksum
mavlink_send_mem
(
chan
,
(
uint8_t
*
)
&
hdr
.
ck
,
MAVLINK_NUM_CHECKSUM_BYTES
);
MAVLINK_BUFFER_CHECK_END
}
#endif
// MESSAGE CMD_ACK UNPACKING
/**
* @brief Get field cmd from cmd_ack message
*
* @return The MAV_CMD ID
*/
static
inline
uint8_t
mavlink_msg_cmd_ack_get_cmd
(
const
mavlink_message_t
*
msg
)
{
mavlink_cmd_ack_t
*
p
=
(
mavlink_cmd_ack_t
*
)
&
msg
->
payload
[
0
];
return
(
uint8_t
)(
p
->
cmd
);
}
/**
* @brief Get field result from cmd_ack message
*
* @return 0: Action DENIED, 1: Action executed
*/
static
inline
uint8_t
mavlink_msg_cmd_ack_get_result
(
const
mavlink_message_t
*
msg
)
{
mavlink_cmd_ack_t
*
p
=
(
mavlink_cmd_ack_t
*
)
&
msg
->
payload
[
0
];
return
(
uint8_t
)(
p
->
result
);
}
/**
* @brief Decode a cmd_ack message into a struct
*
* @param msg The message to decode
* @param cmd_ack C-struct to decode the message contents into
*/
static
inline
void
mavlink_msg_cmd_ack_decode
(
const
mavlink_message_t
*
msg
,
mavlink_cmd_ack_t
*
cmd_ack
)
{
memcpy
(
cmd_ack
,
msg
->
payload
,
sizeof
(
mavlink_cmd_ack_t
));
}
thirdParty/mavlink/include/common/mavlink_msg_position_controller_output.h
deleted
100644 → 0
View file @
b303e674
// MESSAGE POSITION_CONTROLLER_OUTPUT PACKING
#define MAVLINK_MSG_ID_POSITION_CONTROLLER_OUTPUT 61
#define MAVLINK_MSG_ID_POSITION_CONTROLLER_OUTPUT_LEN 5
#define MAVLINK_MSG_61_LEN 5
typedef
struct
__mavlink_position_controller_output_t
{
uint8_t
enabled
;
///< 1: enabled, 0: disabled
int8_t
x
;
///< Position x: -128: -100%, 127: +100%
int8_t
y
;
///< Position y: -128: -100%, 127: +100%
int8_t
z
;
///< Position z: -128: -100%, 127: +100%
int8_t
yaw
;
///< Position yaw: -128: -100%, 127: +100%
}
mavlink_position_controller_output_t
;
/**
* @brief Pack a position_controller_output 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 enabled 1: enabled, 0: disabled
* @param x Position x: -128: -100%, 127: +100%
* @param y Position y: -128: -100%, 127: +100%
* @param z Position z: -128: -100%, 127: +100%
* @param yaw Position yaw: -128: -100%, 127: +100%
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_position_controller_output_pack
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
uint8_t
enabled
,
int8_t
x
,
int8_t
y
,
int8_t
z
,
int8_t
yaw
)
{
mavlink_position_controller_output_t
*
p
=
(
mavlink_position_controller_output_t
*
)
&
msg
->
payload
[
0
];
msg
->
msgid
=
MAVLINK_MSG_ID_POSITION_CONTROLLER_OUTPUT
;
p
->
enabled
=
enabled
;
// uint8_t:1: enabled, 0: disabled
p
->
x
=
x
;
// int8_t:Position x: -128: -100%, 127: +100%
p
->
y
=
y
;
// int8_t:Position y: -128: -100%, 127: +100%
p
->
z
=
z
;
// int8_t:Position z: -128: -100%, 127: +100%
p
->
yaw
=
yaw
;
// int8_t:Position yaw: -128: -100%, 127: +100%
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_POSITION_CONTROLLER_OUTPUT_LEN
);
}
/**
* @brief Pack a position_controller_output message
* @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 enabled 1: enabled, 0: disabled
* @param x Position x: -128: -100%, 127: +100%
* @param y Position y: -128: -100%, 127: +100%
* @param z Position z: -128: -100%, 127: +100%
* @param yaw Position yaw: -128: -100%, 127: +100%
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_position_controller_output_pack_chan
(
uint8_t
system_id
,
uint8_t
component_id
,
uint8_t
chan
,
mavlink_message_t
*
msg
,
uint8_t
enabled
,
int8_t
x
,
int8_t
y
,
int8_t
z
,
int8_t
yaw
)
{
mavlink_position_controller_output_t
*
p
=
(
mavlink_position_controller_output_t
*
)
&
msg
->
payload
[
0
];
msg
->
msgid
=
MAVLINK_MSG_ID_POSITION_CONTROLLER_OUTPUT
;
p
->
enabled
=
enabled
;
// uint8_t:1: enabled, 0: disabled
p
->
x
=
x
;
// int8_t:Position x: -128: -100%, 127: +100%
p
->
y
=
y
;
// int8_t:Position y: -128: -100%, 127: +100%
p
->
z
=
z
;
// int8_t:Position z: -128: -100%, 127: +100%
p
->
yaw
=
yaw
;
// int8_t:Position yaw: -128: -100%, 127: +100%
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_POSITION_CONTROLLER_OUTPUT_LEN
);
}
/**
* @brief Encode a position_controller_output 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 position_controller_output C-struct to read the message contents from
*/
static
inline
uint16_t
mavlink_msg_position_controller_output_encode
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
const
mavlink_position_controller_output_t
*
position_controller_output
)
{
return
mavlink_msg_position_controller_output_pack
(
system_id
,
component_id
,
msg
,
position_controller_output
->
enabled
,
position_controller_output
->
x
,
position_controller_output
->
y
,
position_controller_output
->
z
,
position_controller_output
->
yaw
);
}
/**
* @brief Send a position_controller_output message
* @param chan MAVLink channel to send the message
*
* @param enabled 1: enabled, 0: disabled
* @param x Position x: -128: -100%, 127: +100%
* @param y Position y: -128: -100%, 127: +100%
* @param z Position z: -128: -100%, 127: +100%
* @param yaw Position yaw: -128: -100%, 127: +100%
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static
inline
void
mavlink_msg_position_controller_output_send
(
mavlink_channel_t
chan
,
uint8_t
enabled
,
int8_t
x
,
int8_t
y
,
int8_t
z
,
int8_t
yaw
)
{
mavlink_header_t
hdr
;
mavlink_position_controller_output_t
payload
;
uint16_t
checksum
;
mavlink_position_controller_output_t
*
p
=
&
payload
;
p
->
enabled
=
enabled
;
// uint8_t:1: enabled, 0: disabled
p
->
x
=
x
;
// int8_t:Position x: -128: -100%, 127: +100%
p
->
y
=
y
;
// int8_t:Position y: -128: -100%, 127: +100%
p
->
z
=
z
;
// int8_t:Position z: -128: -100%, 127: +100%
p
->
yaw
=
yaw
;
// int8_t:Position yaw: -128: -100%, 127: +100%
hdr
.
STX
=
MAVLINK_STX
;
hdr
.
len
=
MAVLINK_MSG_ID_POSITION_CONTROLLER_OUTPUT_LEN
;
hdr
.
msgid
=
MAVLINK_MSG_ID_POSITION_CONTROLLER_OUTPUT
;
hdr
.
sysid
=
mavlink_system
.
sysid
;
hdr
.
compid
=
mavlink_system
.
compid
;
hdr
.
seq
=
mavlink_get_channel_status
(
chan
)
->
current_tx_seq
;
mavlink_get_channel_status
(
chan
)
->
current_tx_seq
=
hdr
.
seq
+
1
;
mavlink_send_mem
(
chan
,
(
uint8_t
*
)
&
hdr
.
STX
,
MAVLINK_NUM_HEADER_BYTES
);
crc_init
(
&
checksum
);
checksum
=
crc_calculate_mem
((
uint8_t
*
)
&
hdr
.
len
,
&
checksum
,
MAVLINK_CORE_HEADER_LEN
);
checksum
=
crc_calculate_mem
((
uint8_t
*
)
&
payload
,
&
checksum
,
hdr
.
len
);
hdr
.
ck_a
=
(
uint8_t
)(
checksum
&
0xFF
);
///< Low byte
hdr
.
ck_b
=
(
uint8_t
)(
checksum
>>
8
);
///< High byte
mavlink_send_mem
(
chan
,
(
uint8_t
*
)
&
payload
,
hdr
.
len
);
mavlink_send_mem
(
chan
,
(
uint8_t
*
)
&
hdr
.
ck_a
,
MAVLINK_NUM_CHECKSUM_BYTES
);
}
#endif
// MESSAGE POSITION_CONTROLLER_OUTPUT UNPACKING
/**
* @brief Get field enabled from position_controller_output message
*
* @return 1: enabled, 0: disabled
*/
static
inline
uint8_t
mavlink_msg_position_controller_output_get_enabled
(
const
mavlink_message_t
*
msg
)
{
mavlink_position_controller_output_t
*
p
=
(
mavlink_position_controller_output_t
*
)
&
msg
->
payload
[
0
];
return
(
uint8_t
)(
p
->
enabled
);
}
/**
* @brief Get field x from position_controller_output message
*
* @return Position x: -128: -100%, 127: +100%
*/
static
inline
int8_t
mavlink_msg_position_controller_output_get_x
(
const
mavlink_message_t
*
msg
)
{
mavlink_position_controller_output_t
*
p
=
(
mavlink_position_controller_output_t
*
)
&
msg
->
payload
[
0
];
return
(
int8_t
)(
p
->
x
);
}
/**
* @brief Get field y from position_controller_output message
*
* @return Position y: -128: -100%, 127: +100%
*/
static
inline
int8_t
mavlink_msg_position_controller_output_get_y
(
const
mavlink_message_t
*
msg
)
{
mavlink_position_controller_output_t
*
p
=
(
mavlink_position_controller_output_t
*
)
&
msg
->
payload
[
0
];
return
(
int8_t
)(
p
->
y
);
}
/**
* @brief Get field z from position_controller_output message
*
* @return Position z: -128: -100%, 127: +100%
*/
static
inline
int8_t
mavlink_msg_position_controller_output_get_z
(
const
mavlink_message_t
*
msg
)
{
mavlink_position_controller_output_t
*
p
=
(
mavlink_position_controller_output_t
*
)
&
msg
->
payload
[
0
];
return
(
int8_t
)(
p
->
z
);
}
/**
* @brief Get field yaw from position_controller_output message
*
* @return Position yaw: -128: -100%, 127: +100%
*/
static
inline
int8_t
mavlink_msg_position_controller_output_get_yaw
(
const
mavlink_message_t
*
msg
)
{
mavlink_position_controller_output_t
*
p
=
(
mavlink_position_controller_output_t
*
)
&
msg
->
payload
[
0
];
return
(
int8_t
)(
p
->
yaw
);
}
/**
* @brief Decode a position_controller_output message into a struct
*
* @param msg The message to decode
* @param position_controller_output C-struct to decode the message contents into
*/
static
inline
void
mavlink_msg_position_controller_output_decode
(
const
mavlink_message_t
*
msg
,
mavlink_position_controller_output_t
*
position_controller_output
)
{
memcpy
(
position_controller_output
,
msg
->
payload
,
sizeof
(
mavlink_position_controller_output_t
));
}
thirdParty/mavlink/include/common/mavlink_msg_roll_pitch_yaw_setpoint.h
deleted
100644 → 0
View file @
b303e674
// MESSAGE ROLL_PITCH_YAW_SETPOINT PACKING
#define MAVLINK_MSG_ID_ROLL_PITCH_YAW_SETPOINT 57
#define MAVLINK_MSG_ID_ROLL_PITCH_YAW_SETPOINT_LEN 16
#define MAVLINK_MSG_57_LEN 16
typedef
struct
__mavlink_roll_pitch_yaw_setpoint_t
{
uint32_t
time_ms
;
///< Timestamp in milliseconds since system boot
float
roll
;
///< Desired roll angle in radians
float
pitch
;
///< Desired pitch angle in radians
float
yaw
;
///< Desired yaw angle in radians
}
mavlink_roll_pitch_yaw_setpoint_t
;
/**
* @brief Pack a roll_pitch_yaw_setpoint 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 time_ms Timestamp in milliseconds since system boot
* @param roll Desired roll angle in radians
* @param pitch Desired pitch angle in radians
* @param yaw Desired yaw angle in radians
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_roll_pitch_yaw_setpoint_pack
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
uint32_t
time_ms
,
float
roll
,
float
pitch
,
float
yaw
)
{
mavlink_roll_pitch_yaw_setpoint_t
*
p
=
(
mavlink_roll_pitch_yaw_setpoint_t
*
)
&
msg
->
payload
[
0
];
msg
->
msgid
=
MAVLINK_MSG_ID_ROLL_PITCH_YAW_SETPOINT
;
p
->
time_ms
=
time_ms
;
// uint32_t:Timestamp in milliseconds since system boot
p
->
roll
=
roll
;
// float:Desired roll angle in radians
p
->
pitch
=
pitch
;
// float:Desired pitch angle in radians
p
->
yaw
=
yaw
;
// float:Desired yaw angle in radians
return
mavlink_finalize_message
(
msg
,
system_id
,
component_id
,
MAVLINK_MSG_ID_ROLL_PITCH_YAW_SETPOINT_LEN
);
}
/**
* @brief Pack a roll_pitch_yaw_setpoint message
* @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 time_ms Timestamp in milliseconds since system boot
* @param roll Desired roll angle in radians
* @param pitch Desired pitch angle in radians
* @param yaw Desired yaw angle in radians
* @return length of the message in bytes (excluding serial stream start sign)
*/
static
inline
uint16_t
mavlink_msg_roll_pitch_yaw_setpoint_pack_chan
(
uint8_t
system_id
,
uint8_t
component_id
,
uint8_t
chan
,
mavlink_message_t
*
msg
,
uint32_t
time_ms
,
float
roll
,
float
pitch
,
float
yaw
)
{
mavlink_roll_pitch_yaw_setpoint_t
*
p
=
(
mavlink_roll_pitch_yaw_setpoint_t
*
)
&
msg
->
payload
[
0
];
msg
->
msgid
=
MAVLINK_MSG_ID_ROLL_PITCH_YAW_SETPOINT
;
p
->
time_ms
=
time_ms
;
// uint32_t:Timestamp in milliseconds since system boot
p
->
roll
=
roll
;
// float:Desired roll angle in radians
p
->
pitch
=
pitch
;
// float:Desired pitch angle in radians
p
->
yaw
=
yaw
;
// float:Desired yaw angle in radians
return
mavlink_finalize_message_chan
(
msg
,
system_id
,
component_id
,
chan
,
MAVLINK_MSG_ID_ROLL_PITCH_YAW_SETPOINT_LEN
);
}
/**
* @brief Encode a roll_pitch_yaw_setpoint 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 roll_pitch_yaw_setpoint C-struct to read the message contents from
*/
static
inline
uint16_t
mavlink_msg_roll_pitch_yaw_setpoint_encode
(
uint8_t
system_id
,
uint8_t
component_id
,
mavlink_message_t
*
msg
,
const
mavlink_roll_pitch_yaw_setpoint_t
*
roll_pitch_yaw_setpoint
)
{
return
mavlink_msg_roll_pitch_yaw_setpoint_pack
(
system_id
,
component_id
,
msg
,
roll_pitch_yaw_setpoint
->
time_ms
,
roll_pitch_yaw_setpoint
->
roll
,
roll_pitch_yaw_setpoint
->
pitch
,
roll_pitch_yaw_setpoint
->
yaw
);
}
/**
* @brief Send a roll_pitch_yaw_setpoint message
* @param chan MAVLink channel to send the message
*
* @param time_ms Timestamp in milliseconds since system boot
* @param roll Desired roll angle in radians
* @param pitch Desired pitch angle in radians
* @param yaw Desired yaw angle in radians
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
static
inline
void
mavlink_msg_roll_pitch_yaw_setpoint_send
(
mavlink_channel_t
chan
,
uint32_t
time_ms
,
float
roll
,
float
pitch
,
float
yaw
)
{
mavlink_header_t
hdr
;
mavlink_roll_pitch_yaw_setpoint_t
payload
;
uint16_t
checksum
;
mavlink_roll_pitch_yaw_setpoint_t
*
p
=
&
payload
;
p
->
time_ms
=
time_ms
;
// uint32_t:Timestamp in milliseconds since system boot
p
->
roll
=
roll
;
// float:Desired roll angle in radians
p
->
pitch
=
pitch
;
// float:Desired pitch angle in radians
p
->
yaw
=
yaw
;
// float:Desired yaw angle in radians
hdr
.
STX
=
MAVLINK_STX
;
hdr
.
len
=
MAVLINK_MSG_ID_ROLL_PITCH_YAW_SETPOINT_LEN
;
hdr
.
msgid
=
MAVLINK_MSG_ID_ROLL_PITCH_YAW_SETPOINT
;
hdr
.
sysid
=
mavlink_system
.
sysid
;
hdr
.
compid
=
mavlink_system
.
compid
;
hdr
.
seq
=
mavlink_get_channel_status
(
chan
)
->
current_tx_seq
;
mavlink_get_channel_status
(
chan
)
->
current_tx_seq
=
hdr
.
seq
+
1
;
mavlink_send_mem
(
chan
,
(
uint8_t
*
)
&
hdr
.
STX
,
MAVLINK_NUM_HEADER_BYTES
);
crc_init
(
&
checksum
);
checksum
=
crc_calculate_mem
((
uint8_t
*
)
&
hdr
.
len
,
&
checksum
,
MAVLINK_CORE_HEADER_LEN
);
checksum
=
crc_calculate_mem
((
uint8_t
*
)
&
payload
,
&
checksum
,
hdr
.
len
);
hdr
.
ck_a
=
(
uint8_t
)(
checksum
&
0xFF
);
///< Low byte
hdr
.
ck_b
=
(
uint8_t
)(
checksum
>>
8
);
///< High byte
mavlink_send_mem
(
chan
,
(
uint8_t
*
)
&
payload
,
hdr
.
len
);
mavlink_send_mem
(
chan
,
(
uint8_t
*
)
&
hdr
.
ck_a
,
MAVLINK_NUM_CHECKSUM_BYTES
);
}
#endif
// MESSAGE ROLL_PITCH_YAW_SETPOINT UNPACKING
/**
* @brief Get field time_ms from roll_pitch_yaw_setpoint message
*
* @return Timestamp in milliseconds since system boot
*/
static
inline
uint32_t
mavlink_msg_roll_pitch_yaw_setpoint_get_time_ms
(
const
mavlink_message_t
*
msg
)
{
mavlink_roll_pitch_yaw_setpoint_t
*
p
=
(
mavlink_roll_pitch_yaw_setpoint_t
*
)
&
msg
->
payload
[
0
];
return
(
uint32_t
)(
p
->
time_ms
);
}
/**
* @brief Get field roll from roll_pitch_yaw_setpoint message
*
* @return Desired roll angle in radians
*/
static
inline
float
mavlink_msg_roll_pitch_yaw_setpoint_get_roll
(
const
mavlink_message_t
*
msg
)
{
mavlink_roll_pitch_yaw_setpoint_t
*
p
=
(
mavlink_roll_pitch_yaw_setpoint_t
*
)
&
msg
->
payload
[
0
];
return
(
float
)(
p
->
roll
);
}