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
5a8dce08
Commit
5a8dce08
authored
Feb 06, 2020
by
Valentin Platzgummer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WimaController::fetchContainerData() changed
parent
56781a94
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
21 deletions
+21
-21
WimaController.cc
src/Wima/WimaController.cc
+16
-21
WimaDataContainer.cc
src/Wima/WimaDataContainer.cc
+5
-0
No files found.
src/Wima/WimaController.cc
View file @
5a8dce08
...
...
@@ -469,22 +469,22 @@ bool WimaController::fetchContainerData()
_visualItems
.
clear
();
_missionItems
.
clearAndDeleteContents
();
_currentMissionItems
.
clearAndDeleteContents
();
_waypointPath
.
clear
();
_currentWaypointPath
.
clear
();
emit
visualItemsChanged
();
emit
missionItemsChanged
();
emit
currentMissionItemsChanged
();
emit
currentWaypointPathChanged
();
_localPlanDataValid
=
false
;
_localPlanDataValid
=
false
;
if
(
_container
==
nullptr
)
{
QSharedPointer
<
const
WimaPlanData
>
planData
;
if
(
_container
!=
nullptr
)
{
planData
=
_container
->
pull
();
}
else
{
qWarning
(
"WimaController::fetchContainerData(): No container assigned!"
);
return
false
;
}
QSharedPointer
<
const
WimaPlanData
>
planData
=
_container
->
pull
();
// extract mission items
QList
<
QSharedPointer
<
const
MissionItem
>>
tempMissionItems
=
planData
->
missionItems
();
if
(
tempMissionItems
.
size
()
<
1
)
return
false
;
// extract list with WimaAreas
QList
<
const
WimaAreaData
*>
areaList
=
planData
->
areaList
();
...
...
@@ -528,12 +528,12 @@ bool WimaController::fetchContainerData()
if
(
areaCounter
>=
numAreas
)
break
;
}
}
// extract mission items
QList
<
QSharedPointer
<
const
MissionItem
>>
tempMissionItems
=
planData
->
missionItems
();
if
(
tempMissionItems
.
size
()
<
1
)
if
(
areaCounter
!=
numAreas
)
{
qWarning
(
"WimaController::fetchContainerData(): areaCounter != numAreas"
);
return
false
;
}
// create mission items
_missionController
->
removeAll
();
...
...
@@ -553,12 +553,8 @@ bool WimaController::fetchContainerData()
SimpleMissionItem
*
visualItemCopy
=
new
SimpleMissionItem
(
*
visualItem
,
true
,
this
);
_missionItems
.
append
(
visualItemCopy
);
}
if
(
areaCounter
!=
numAreas
)
return
false
;
if
(
!
setTakeoffLandPosition
())
return
false
;
setTakeoffLandPosition
();
updateWaypointPath
();
// set _nextPhaseStartWaypointIndex to 1
...
...
@@ -567,15 +563,14 @@ bool WimaController::fetchContainerData()
_nextPhaseStartWaypointIndex
.
setRawValue
(
reverse
?
_missionItems
.
count
()
:
int
(
1
));
connect
(
&
_nextPhaseStartWaypointIndex
,
&
Fact
::
rawValueChanged
,
this
,
&
WimaController
::
calcNextPhase
);
/*
if(!calcNextPhase())
return false;
*/
emit
visualItemsChanged
();
emit
missionItemsChanged
();
_localPlanDataValid
=
true
;
return
true
;
}
...
...
src/Wima/WimaDataContainer.cc
View file @
5a8dce08
...
...
@@ -18,7 +18,12 @@ void WimaDataContainer::push(QSharedPointer<const WimaPlanData> planData)
{
_planData
=
planData
;
auto
start
=
std
::
chrono
::
high_resolution_clock
::
now
();
emit
newDataAvailable
();
qWarning
()
<<
"WimaDataContainer::push"
<<
std
::
chrono
::
duration_cast
<
std
::
chrono
::
milliseconds
>
(
std
::
chrono
::
high_resolution_clock
::
now
()
-
start
).
count
()
<<
" ms"
;
}
/*!
...
...
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