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
ef6971a2
Commit
ef6971a2
authored
Oct 30, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Start logging on heartbeat
parent
f9d58d34
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
19 deletions
+17
-19
MAVLinkProtocol.cc
src/comm/MAVLinkProtocol.cc
+17
-19
No files found.
src/comm/MAVLinkProtocol.cc
View file @
ef6971a2
...
@@ -198,13 +198,6 @@ void MAVLinkProtocol::_linkStatusChanged(LinkInterface* link, bool connected)
...
@@ -198,13 +198,6 @@ void MAVLinkProtocol::_linkStatusChanged(LinkInterface* link, bool connected)
// Use the same shared pointer as LinkManager
// Use the same shared pointer as LinkManager
_connectedLinks
.
append
(
_linkMgr
->
sharedPointerForLink
(
link
));
_connectedLinks
.
append
(
_linkMgr
->
sharedPointerForLink
(
link
));
#ifndef __mobile__
if
(
_connectedLinks
.
count
()
==
1
)
{
// This is the first link, we need to start logging
_startLogging
();
}
#endif
// Send command to start MAVLink
// Send command to start MAVLink
// XXX hacky but safe
// XXX hacky but safe
// Start NSH
// Start NSH
...
@@ -364,6 +357,11 @@ void MAVLinkProtocol::receiveBytes(LinkInterface* link, QByteArray b)
...
@@ -364,6 +357,11 @@ void MAVLinkProtocol::receiveBytes(LinkInterface* link, QByteArray b)
#endif
#endif
if
(
message
.
msgid
==
MAVLINK_MSG_ID_HEARTBEAT
)
{
if
(
message
.
msgid
==
MAVLINK_MSG_ID_HEARTBEAT
)
{
#ifndef __mobile__
// Start loggin on first heartbeat
_startLogging
();
#endif
// Notify the vehicle manager of the heartbeat. This will create/update vehicles as needed.
// Notify the vehicle manager of the heartbeat. This will create/update vehicles as needed.
mavlink_heartbeat_t
heartbeat
;
mavlink_heartbeat_t
heartbeat
;
mavlink_msg_heartbeat_decode
(
&
message
,
&
heartbeat
);
mavlink_msg_heartbeat_decode
(
&
message
,
&
heartbeat
);
...
@@ -657,8 +655,7 @@ bool MAVLinkProtocol::_closeLogFile(void)
...
@@ -657,8 +655,7 @@ bool MAVLinkProtocol::_closeLogFile(void)
void
MAVLinkProtocol
::
_startLogging
(
void
)
void
MAVLinkProtocol
::
_startLogging
(
void
)
{
{
Q_ASSERT
(
!
_tempLogFile
.
isOpen
());
if
(
!
_tempLogFile
.
isOpen
())
{
if
(
!
_logSuspendReplay
)
{
if
(
!
_logSuspendReplay
)
{
if
(
!
_tempLogFile
.
open
())
{
if
(
!
_tempLogFile
.
open
())
{
emit
protocolStatusMessage
(
tr
(
"MAVLink Protocol"
),
tr
(
"Opening Flight Data file for writing failed. "
emit
protocolStatusMessage
(
tr
(
"MAVLink Protocol"
),
tr
(
"Opening Flight Data file for writing failed. "
...
@@ -672,6 +669,7 @@ void MAVLinkProtocol::_startLogging(void)
...
@@ -672,6 +669,7 @@ void MAVLinkProtocol::_startLogging(void)
_logSuspendError
=
false
;
_logSuspendError
=
false
;
}
}
}
}
}
void
MAVLinkProtocol
::
_stopLogging
(
void
)
void
MAVLinkProtocol
::
_stopLogging
(
void
)
...
...
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