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
b4dc5f3c
Commit
b4dc5f3c
authored
Oct 05, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mavlink 2.0 support
No signing support yet
parent
531b9ac3
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
155 additions
and
166 deletions
+155
-166
QGCExternalLibs.pri
QGCExternalLibs.pri
+1
-1
v2.0
libs/mavlink/include/mavlink/v2.0
+1
-1
LinkManager.cc
src/comm/LinkManager.cc
+2
-0
MAVLinkProtocol.cc
src/comm/MAVLinkProtocol.cc
+9
-0
MAVLinkDecoder.cc
src/ui/MAVLinkDecoder.cc
+71
-69
MAVLinkDecoder.h
src/ui/MAVLinkDecoder.h
+0
-1
QGCMAVLinkInspector.cc
src/ui/QGCMAVLinkInspector.cc
+70
-92
QGCMAVLinkInspector.h
src/ui/QGCMAVLinkInspector.h
+1
-2
No files found.
QGCExternalLibs.pri
View file @
b4dc5f3c
...
...
@@ -17,7 +17,7 @@ WindowsBuild {
# a single compiled codebase this hardwiring of dialect can go away. But until then
# this "workaround" is needed.
MAVLINKPATH_REL = libs/mavlink/include/mavlink/v
1
.0
MAVLINKPATH_REL = libs/mavlink/include/mavlink/v
2
.0
MAVLINKPATH = $$BASEDIR/$$MAVLINKPATH_REL
MAVLINK_CONF = ardupilotmega
DEFINES += MAVLINK_NO_DATA
...
...
v2.0
@
36f37bde
Subproject commit
1ae7a11de2d17ee620edf71a9d7342e601eec347
Subproject commit
36f37bde1df2dd36661fbcbd6ed5aaf0424c8269
src/comm/LinkManager.cc
View file @
b4dc5f3c
...
...
@@ -191,6 +191,8 @@ void LinkManager::_addLink(LinkInterface* link)
if
(
!
(
_mavlinkChannelsUsedBitMask
&
1
<<
i
))
{
mavlink_reset_channel_status
(
i
);
link
->
_setMavlinkChannel
(
i
);
// Start the channel on Mav 1 protocol
mavlink_get_channel_status
(
i
)
->
flags
=
mavlink_get_channel_status
(
i
)
->
flags
|
MAVLINK_STATUS_FLAG_OUT_MAVLINK1
;
_mavlinkChannelsUsedBitMask
|=
1
<<
i
;
channelSet
=
true
;
break
;
...
...
src/comm/MAVLinkProtocol.cc
View file @
b4dc5f3c
...
...
@@ -214,6 +214,15 @@ void MAVLinkProtocol::receiveBytes(LinkInterface* link, QByteArray b)
{
decodedFirstPacket
=
true
;
mavlink_status_t
*
mavlinkStatus
=
mavlink_get_channel_status
(
mavlinkChannel
);
if
(
!
(
mavlinkStatus
->
flags
&
MAVLINK_STATUS_FLAG_IN_MAVLINK1
)
&&
(
mavlinkStatus
->
flags
&
MAVLINK_STATUS_FLAG_OUT_MAVLINK1
))
{
qDebug
()
<<
"switch to mavlink 2.0"
<<
mavlinkStatus
->
flags
;
mavlinkStatus
->
flags
&=
~
MAVLINK_STATUS_FLAG_OUT_MAVLINK1
;
}
else
if
((
mavlinkStatus
->
flags
&
MAVLINK_STATUS_FLAG_IN_MAVLINK1
)
&&
!
(
mavlinkStatus
->
flags
&
MAVLINK_STATUS_FLAG_OUT_MAVLINK1
))
{
qDebug
()
<<
"switch to mavlink 1.0"
<<
mavlinkStatus
->
flags
;
mavlinkStatus
->
flags
|=
MAVLINK_STATUS_FLAG_OUT_MAVLINK1
;
}
if
(
message
.
msgid
==
MAVLINK_MSG_ID_RADIO_STATUS
)
{
// process telemetry status message
...
...
src/ui/MAVLinkDecoder.cc
View file @
b4dc5f3c
This diff is collapsed.
Click to expand it.
src/ui/MAVLinkDecoder.h
View file @
b4dc5f3c
...
...
@@ -26,7 +26,6 @@ protected:
quint64
getUnixTimeFromMs
(
int
systemID
,
quint64
time
);
mavlink_message_t
receivedMessages
[
256
];
///< Available / known messages
mavlink_message_info_t
messageInfo
[
256
];
///< Message information
QMap
<
uint16_t
,
bool
>
messageFilter
;
///< Message/field names not to emit
QMap
<
uint16_t
,
bool
>
textMessageFilter
;
///< Message/field names not to emit in text mode
int
componentID
[
256
];
///< Multi component detection
...
...
src/ui/QGCMAVLinkInspector.cc
View file @
b4dc5f3c
This diff is collapsed.
Click to expand it.
src/ui/QGCMAVLinkInspector.h
View file @
b4dc5f3c
...
...
@@ -44,7 +44,6 @@ protected:
QMap
<
int
,
int
>
components
;
///< Already observed components
QMap
<
int
,
float
>
onboardMessageInterval
;
///< Stores the onboard selected data rate
QTimer
updateTimer
;
///< Only update at 1 Hz to not overload the GUI
mavlink_message_info_t
messageInfo
[
256
];
// Store the metadata for all available MAVLink messages.
QMap
<
int
,
QTreeWidgetItem
*
>
uasTreeWidgetItems
;
///< Tree of available uas with their widget
QMap
<
int
,
QMap
<
int
,
QTreeWidgetItem
*>*
>
uasMsgTreeItems
;
///< Stores the widget of the received message for each UAS
...
...
@@ -57,7 +56,7 @@ protected:
QMap
<
int
,
QMap
<
int
,
quint64
>*
>
uasLastMessageUpdate
;
///< Stores the time of the last message for each message of each UAS
/* @brief Update one message field */
void
updateField
(
int
sysid
,
int
msgid
,
int
fieldid
,
QTreeWidgetItem
*
item
);
void
updateField
(
mavlink_message_t
*
msg
,
const
mavlink_message_info_t
*
msgInfo
,
int
fieldid
,
QTreeWidgetItem
*
item
);
/** @brief Rebuild the list of components */
void
rebuildComponentList
();
/* @brief Create a new tree for a new UAS */
...
...
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