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
5f262fba
Commit
5f262fba
authored
Oct 30, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add logging
parent
f9d58d34
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
MultiVehicleManager.cc
src/Vehicle/MultiVehicleManager.cc
+10
-0
MultiVehicleManager.h
src/Vehicle/MultiVehicleManager.h
+3
-0
No files found.
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
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