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
e97c3c36
Commit
e97c3c36
authored
Nov 13, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2210 from DonLakeFlyer/LogClose
Stop logging on last vehicle gone
parents
820e98a2
24e75cfb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
7 deletions
+17
-7
MAVLinkProtocol.cc
src/comm/MAVLinkProtocol.cc
+14
-7
MAVLinkProtocol.h
src/comm/MAVLinkProtocol.h
+3
-0
No files found.
src/comm/MAVLinkProtocol.cc
View file @
e97c3c36
...
...
@@ -108,6 +108,8 @@ void MAVLinkProtocol::setToolbox(QGCToolbox *toolbox)
connect
(
this
,
&
MAVLinkProtocol
::
protocolStatusMessage
,
_app
,
&
QGCApplication
::
criticalMessageBoxOnMainThread
);
connect
(
this
,
&
MAVLinkProtocol
::
saveTempFlightDataLog
,
_app
,
&
QGCApplication
::
saveTempFlightDataLogOnMainThread
);
connect
(
_multiVehicleManager
->
vehicles
(),
&
QmlObjectListModel
::
countChanged
,
this
,
&
MAVLinkProtocol
::
_vehicleCountChanged
);
emit
versionCheckChanged
(
m_enable_version_check
);
}
...
...
@@ -217,13 +219,6 @@ void MAVLinkProtocol::_linkStatusChanged(LinkInterface* link, bool connected)
}
Q_UNUSED
(
found
);
Q_ASSERT
(
found
);
#ifndef __mobile__
if
(
_connectedLinks
.
count
()
==
0
)
{
// Last link is gone, close out logging
_stopLogging
();
}
#endif
}
}
...
...
@@ -634,6 +629,18 @@ int MAVLinkProtocol::getHeartbeatRate()
return
_heartbeatRate
;
}
void
MAVLinkProtocol
::
_vehicleCountChanged
(
int
count
)
{
#ifndef __mobile__
if
(
count
==
0
)
{
// Last vehicle is gone, close out logging
_stopLogging
();
}
#else
Q_UNUSED
(
count
);
#endif
}
#ifndef __mobile__
/// @brief Closes the log file if it is open
bool
MAVLinkProtocol
::
_closeLogFile
(
void
)
...
...
src/comm/MAVLinkProtocol.h
View file @
e97c3c36
...
...
@@ -283,6 +283,9 @@ signals:
/// @brief Emitted when a temporary log file is ready for saving
void
saveTempFlightDataLog
(
QString
tempLogfile
);
private
slots
:
void
_vehicleCountChanged
(
int
count
);
private:
void
_linkStatusChanged
(
LinkInterface
*
link
,
bool
connected
);
...
...
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