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
95e6f2fc
Commit
95e6f2fc
authored
Jul 03, 2017
by
DonLakeFlyer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disconnect signals and force initial request complete if possible
parent
d5ff9e46
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
PlanMasterController.cc
src/MissionManager/PlanMasterController.cc
+19
-0
No files found.
src/MissionManager/PlanMasterController.cc
View file @
95e6f2fc
...
@@ -89,6 +89,16 @@ void PlanMasterController::_activeVehicleChanged(Vehicle* activeVehicle)
...
@@ -89,6 +89,16 @@ void PlanMasterController::_activeVehicleChanged(Vehicle* activeVehicle)
qCDebug
(
PlanMasterControllerLog
)
<<
"_activeVehicleChanged"
<<
activeVehicle
;
qCDebug
(
PlanMasterControllerLog
)
<<
"_activeVehicleChanged"
<<
activeVehicle
;
if
(
_managerVehicle
)
{
// Disconnect old vehicle
disconnect
(
_managerVehicle
->
missionManager
(),
&
MissionManager
::
newMissionItemsAvailable
,
this
,
&
PlanMasterController
::
_loadMissionComplete
);
disconnect
(
_managerVehicle
->
geoFenceManager
(),
&
GeoFenceManager
::
loadComplete
,
this
,
&
PlanMasterController
::
_loadGeoFenceComplete
);
disconnect
(
_managerVehicle
->
rallyPointManager
(),
&
RallyPointManager
::
loadComplete
,
this
,
&
PlanMasterController
::
_loadRallyPointsComplete
);
disconnect
(
_managerVehicle
->
missionManager
(),
&
MissionManager
::
sendComplete
,
this
,
&
PlanMasterController
::
_sendMissionComplete
);
disconnect
(
_managerVehicle
->
geoFenceManager
(),
&
GeoFenceManager
::
sendComplete
,
this
,
&
PlanMasterController
::
_sendGeoFenceComplete
);
disconnect
(
_managerVehicle
->
rallyPointManager
(),
&
RallyPointManager
::
sendComplete
,
this
,
&
PlanMasterController
::
_sendRallyPointsComplete
);
}
bool
newOffline
=
false
;
bool
newOffline
=
false
;
if
(
activeVehicle
==
NULL
)
{
if
(
activeVehicle
==
NULL
)
{
// Since there is no longer an active vehicle we use the offline controller vehicle as the manager vehicle
// Since there is no longer an active vehicle we use the offline controller vehicle as the manager vehicle
...
@@ -353,6 +363,7 @@ void PlanMasterController::removeAllFromVehicle(void)
...
@@ -353,6 +363,7 @@ void PlanMasterController::removeAllFromVehicle(void)
_missionController
.
removeAllFromVehicle
();
_missionController
.
removeAllFromVehicle
();
_geoFenceController
.
removeAllFromVehicle
();
_geoFenceController
.
removeAllFromVehicle
();
_rallyPointController
.
removeAllFromVehicle
();
_rallyPointController
.
removeAllFromVehicle
();
setDirty
(
false
);
}
else
{
}
else
{
qWarning
()
<<
"PlanMasterController::removeAllFromVehicle called while offline"
;
qWarning
()
<<
"PlanMasterController::removeAllFromVehicle called while offline"
;
}
}
...
@@ -410,6 +421,14 @@ void PlanMasterController::sendPlanToVehicle(Vehicle* vehicle, const QString& fi
...
@@ -410,6 +421,14 @@ void PlanMasterController::sendPlanToVehicle(Vehicle* vehicle, const QString& fi
void
PlanMasterController
::
_showPlanFromManagerVehicle
(
void
)
void
PlanMasterController
::
_showPlanFromManagerVehicle
(
void
)
{
{
if
(
!
_managerVehicle
->
initialPlanRequestComplete
()
&&
!
_missionController
.
syncInProgress
()
&&
!
_geoFenceController
.
syncInProgress
()
&&
!
_rallyPointController
.
syncInProgress
())
{
// Something went wrong with initial load. All controllers are idle, so just force it off
_managerVehicle
->
forceInitialPlanRequestComplete
();
}
// The crazy if structure is to handle the load propogating by itself through the system
// The crazy if structure is to handle the load propogating by itself through the system
if
(
!
_missionController
.
showPlanFromManagerVehicle
())
{
if
(
!
_missionController
.
showPlanFromManagerVehicle
())
{
if
(
!
_geoFenceController
.
showPlanFromManagerVehicle
())
{
if
(
!
_geoFenceController
.
showPlanFromManagerVehicle
())
{
...
...
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