Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
41866c2f
Commit
41866c2f
authored
Nov 13, 2015
by
Don Gagne
Browse files
Stop logging on last vehicle gone
parent
820e98a2
Changes
2
Show whitespace changes
Inline
Side-by-side
src/comm/MAVLinkProtocol.cc
View file @
41866c2f
...
...
@@ -108,6 +108,10 @@ void MAVLinkProtocol::setToolbox(QGCToolbox *toolbox)
connect
(
this
,
&
MAVLinkProtocol
::
protocolStatusMessage
,
_app
,
&
QGCApplication
::
criticalMessageBoxOnMainThread
);
connect
(
this
,
&
MAVLinkProtocol
::
saveTempFlightDataLog
,
_app
,
&
QGCApplication
::
saveTempFlightDataLogOnMainThread
);
#ifndef __mobile__
connect
(
_multiVehicleManager
->
vehicles
(),
&
QmlObjectListModel
::
countChanged
,
this
,
&
MAVLinkProtocol
::
_vehicleCountChanged
);
#endif
emit
versionCheckChanged
(
m_enable_version_check
);
}
...
...
@@ -217,13 +221,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
}
}
...
...
@@ -729,4 +726,12 @@ void MAVLinkProtocol::deleteTempLogFiles(void)
QFile
::
remove
(
fileInfo
.
filePath
());
}
}
void
MAVLinkProtocol
::
_vehicleCountChanged
(
int
count
)
{
if
(
count
==
0
)
{
// Last vehicle is gone, close out logging
_stopLogging
();
}
}
#endif
src/comm/MAVLinkProtocol.h
View file @
41866c2f
...
...
@@ -284,6 +284,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
Supports
Markdown
0%
Try again
or
attach a new 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