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
11b3e471
Commit
11b3e471
authored
Aug 10, 2011
by
LM
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Last changes
parent
a9d925f8
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
544 deletions
+29
-544
MAVLinkSimulationLink.cc
src/comm/MAVLinkSimulationLink.cc
+1
-0
mavlink_protocol.h
thirdParty/mavlink/include/mavlink_protocol.h
+5
-532
mavlink_types.h
thirdParty/mavlink/include/mavlink_types.h
+23
-12
No files found.
src/comm/MAVLinkSimulationLink.cc
View file @
11b3e471
...
@@ -556,6 +556,7 @@ void MAVLinkSimulationLink::mainloop()
...
@@ -556,6 +556,7 @@ void MAVLinkSimulationLink::mainloop()
messageSize
=
mavlink_msg_heartbeat_pack
(
systemId
,
componentId
,
&
msg
,
mavType
,
MAV_CLASS_PIXHAWK
);
messageSize
=
mavlink_msg_heartbeat_pack
(
systemId
,
componentId
,
&
msg
,
mavType
,
MAV_CLASS_PIXHAWK
);
// Allocate buffer with packet data
// Allocate buffer with packet data
bufferlength
=
mavlink_msg_to_send_buffer
(
buffer
,
&
msg
);
bufferlength
=
mavlink_msg_to_send_buffer
(
buffer
,
&
msg
);
qDebug
()
<<
"CRC:"
<<
msg
.
ck_a
<<
msg
.
ck_b
;
//add data into datastream
//add data into datastream
memcpy
(
stream
+
streampointer
,
buffer
,
bufferlength
);
memcpy
(
stream
+
streampointer
,
buffer
,
bufferlength
);
streampointer
+=
bufferlength
;
streampointer
+=
bufferlength
;
...
...
thirdParty/mavlink/include/mavlink_protocol.h
View file @
11b3e471
This diff is collapsed.
Click to expand it.
thirdParty/mavlink/include/mavlink_types.h
View file @
11b3e471
...
@@ -22,20 +22,27 @@
...
@@ -22,20 +22,27 @@
#define MAVLINK_MAX_PACKET_LEN (MAVLINK_MAX_PAYLOAD_LEN + MAVLINK_NUM_NON_PAYLOAD_BYTES) ///< Maximum packet length
#define MAVLINK_MAX_PACKET_LEN (MAVLINK_MAX_PAYLOAD_LEN + MAVLINK_NUM_NON_PAYLOAD_BYTES) ///< Maximum packet length
//#define MAVLINK_MAX_DATA_LEN MAVLINK_MAX_PACKET_LEN - MAVLINK_STX_LEN
//#define MAVLINK_MAX_DATA_LEN MAVLINK_MAX_PACKET_LEN - MAVLINK_STX_LEN
typedef
struct
__mavlink_system
{
typedef
struct
__mavlink_system
{
uint8_t
sysid
;
///< Used by the MAVLink message_xx_send() convenience function
uint8_t
sysid
;
///< Used by the MAVLink message_xx_send() convenience function
uint8_t
compid
;
///< Used by the MAVLink message_xx_send() convenience function
uint8_t
compid
;
///< Used by the MAVLink message_xx_send() convenience function
uint8_t
type
;
///< Unused, can be used by user to store the system's type
uint8_t
type
;
///< Unused, can be used by user to store the system's type
uint8_t
state
;
///< Unused, can be used by user to store the system's state
uint8_t
state
;
///< Unused, can be used by user to store the system's state
uint8_t
mode
;
///< Unused, can be used by user to store the system's mode
uint8_t
mode
;
///< Unused, can be used by user to store the system's mode
uint8_t
nav_mode
;
///< Unused, can be used by user to store the system's navigation mode
}
mavlink_system_t
;
}
mavlink_system_t
;
typedef
struct
__mavlink_message
{
typedef
struct
__mavlink_message
union
{
{
uint16_t
ck
;
///< Checksum high byte
union
uint8_t
ck_a
;
///< Checksum low byte
{
uint8_t
ck_b
;
///< Checksum high byte
uint16_t
ck
;
///< Checksum high byte
};
struct
{
uint8_t
ck_a
;
///< Checksum low byte
uint8_t
ck_b
;
///< Checksum high byte
};
};
uint8_t
STX
;
///< start of packet marker
uint8_t
STX
;
///< start of packet marker
uint8_t
len
;
///< Length of payload
uint8_t
len
;
///< Length of payload
uint8_t
seq
;
///< Sequence of packet
uint8_t
seq
;
///< Sequence of packet
...
@@ -45,7 +52,8 @@ typedef struct __mavlink_message {
...
@@ -45,7 +52,8 @@ typedef struct __mavlink_message {
uint8_t
payload
[
MAVLINK_MAX_PAYLOAD_LEN
];
///< Payload data, ALIGNMENT IMPORTANT ON MCU
uint8_t
payload
[
MAVLINK_MAX_PAYLOAD_LEN
];
///< Payload data, ALIGNMENT IMPORTANT ON MCU
}
mavlink_message_t
;
}
mavlink_message_t
;
typedef
struct
__mavlink_header
{
typedef
struct
__mavlink_header
{
union
{
union
{
uint16_t
ck
;
///< Checksum high byte
uint16_t
ck
;
///< Checksum high byte
uint8_t
ck_a
;
///< Checksum low byte
uint8_t
ck_a
;
///< Checksum low byte
...
@@ -59,16 +67,18 @@ typedef struct __mavlink_header {
...
@@ -59,16 +67,18 @@ typedef struct __mavlink_header {
uint8_t
msgid
;
///< ID of message in payload
uint8_t
msgid
;
///< ID of message in payload
}
mavlink_header_t
;
}
mavlink_header_t
;
typedef
enum
{
typedef
enum
{
MAVLINK_COMM_0
,
MAVLINK_COMM_0
,
MAVLINK_COMM_1
,
MAVLINK_COMM_1
,
MAVLINK_COMM_2
,
MAVLINK_COMM_2
,
MAVLINK_COMM_3
,
MAVLINK_COMM_3
,
MAVLINK_COMM_NB
,
MAVLINK_COMM_NB
,
MAVLINK_COMM_NB_HIGH
=
16
MAVLINK_COMM_NB_HIGH
=
16
}
mavlink_channel_t
;
}
mavlink_channel_t
;
typedef
enum
{
typedef
enum
{
MAVLINK_PARSE_STATE_UNINIT
=
0
,
MAVLINK_PARSE_STATE_UNINIT
=
0
,
MAVLINK_PARSE_STATE_IDLE
,
MAVLINK_PARSE_STATE_IDLE
,
MAVLINK_PARSE_STATE_GOT_STX
,
MAVLINK_PARSE_STATE_GOT_STX
,
...
@@ -81,7 +91,8 @@ typedef enum {
...
@@ -81,7 +91,8 @@ typedef enum {
MAVLINK_PARSE_STATE_GOT_CRC1
MAVLINK_PARSE_STATE_GOT_CRC1
}
mavlink_parse_state_t
;
///< The state machine for the comm parser
}
mavlink_parse_state_t
;
///< The state machine for the comm parser
typedef
struct
__mavlink_status
{
typedef
struct
__mavlink_status
{
uint8_t
ck_a
;
///< Checksum byte 1
uint8_t
ck_a
;
///< Checksum byte 1
uint8_t
ck_b
;
///< Checksum byte 2
uint8_t
ck_b
;
///< Checksum byte 2
uint8_t
msg_received
;
///< Number of received messages
uint8_t
msg_received
;
///< Number of received messages
...
...
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