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
e97c3c36
Commit
e97c3c36
authored
Nov 13, 2015
by
Don Gagne
Browse files
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
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
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