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
5f262fba
Commit
5f262fba
authored
Oct 30, 2015
by
Don Gagne
Browse files
Add logging
parent
f9d58d34
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/Vehicle/MultiVehicleManager.cc
View file @
5f262fba
...
...
@@ -30,6 +30,8 @@
#include
"UAS.h"
#include
"QGCApplication.h"
QGC_LOGGING_CATEGORY
(
MultiVehicleManagerLog
,
"MultiVehicleManagerLog"
)
MultiVehicleManager
::
MultiVehicleManager
(
QGCApplication
*
app
)
:
QGCTool
(
app
)
,
_activeVehicleAvailable
(
false
)
...
...
@@ -97,6 +99,8 @@ bool MultiVehicleManager::notifyHeartbeatInfo(LinkInterface* link, int vehicleId
/// and all other right things happen when the Vehicle goes away.
void
MultiVehicleManager
::
_deleteVehiclePhase1
(
Vehicle
*
vehicle
)
{
qCDebug
(
MultiVehicleManagerLog
)
<<
"_deleteVehiclePhase1"
;
_vehicleBeingDeleted
=
vehicle
;
// Remove from map
...
...
@@ -133,6 +137,8 @@ void MultiVehicleManager::_deleteVehiclePhase1(Vehicle* vehicle)
void
MultiVehicleManager
::
_deleteVehiclePhase2
(
void
)
{
qCDebug
(
MultiVehicleManagerLog
)
<<
"_deleteVehiclePhase2"
;
/// Qml has been notified of vehicle about to go away and should be disconnected from it by now.
/// This means we can now clear the active vehicle property and delete the Vehicle for real.
...
...
@@ -157,6 +163,8 @@ void MultiVehicleManager::_deleteVehiclePhase2 (void)
void
MultiVehicleManager
::
setActiveVehicle
(
Vehicle
*
vehicle
)
{
qCDebug
(
MultiVehicleManagerLog
)
<<
"setActiveVehicle"
<<
vehicle
;
if
(
vehicle
!=
_activeVehicle
)
{
if
(
_activeVehicle
)
{
_activeVehicle
->
setActive
(
false
);
...
...
@@ -180,6 +188,8 @@ void MultiVehicleManager::setActiveVehicle(Vehicle* vehicle)
void
MultiVehicleManager
::
_setActiveVehiclePhase2
(
void
)
{
qCDebug
(
MultiVehicleManagerLog
)
<<
"_setActiveVehiclePhase2"
;
// Now we signal the new active vehicle
_activeVehicle
=
_vehicleBeingSetActive
;
emit
activeVehicleChanged
(
_activeVehicle
);
...
...
src/Vehicle/MultiVehicleManager.h
View file @
5f262fba
...
...
@@ -31,6 +31,7 @@
#include
"QGCMAVLink.h"
#include
"QmlObjectListModel.h"
#include
"QGCToolbox.h"
#include
"QGCLoggingCategory.h"
class
FirmwarePluginManager
;
class
AutoPilotPluginManager
;
...
...
@@ -38,6 +39,8 @@ class JoystickManager;
class
QGCApplication
;
class
MAVLinkProtocol
;
Q_DECLARE_LOGGING_CATEGORY
(
MultiVehicleManagerLog
)
class
MultiVehicleManager
:
public
QGCTool
{
Q_OBJECT
...
...
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