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
32146c9e
Commit
32146c9e
authored
Feb 06, 2020
by
Valentin Platzgummer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
_currentItems removed from WimaController
parent
c8c80fb1
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
92265 additions
and
126 deletions
+92265
-126
callgrind.SyncWimaFetchCurrentItemsRemoved
...ling/callgrind/callgrind.SyncWimaFetchCurrentItemsRemoved
+44157
-0
callgrind.SyncWimaFetchDirtyMoved
profiling/callgrind/callgrind.SyncWimaFetchDirtyMoved
+48038
-0
FlightDisplayViewMap.qml
src/FlightDisplay/FlightDisplayViewMap.qml
+2
-2
PlanMapItems.qml
src/FlightMap/MapItems/PlanMapItems.qml
+0
-1
MissionController.cc
src/MissionManager/MissionController.cc
+23
-2
MissionController.h
src/MissionManager/MissionController.h
+2
-1
WimaController.cc
src/Wima/WimaController.cc
+36
-104
WimaController.h
src/Wima/WimaController.h
+3
-16
WimaPlaner.cc
src/Wima/WimaPlaner.cc
+4
-0
No files found.
profiling/callgrind/callgrind.SyncWimaFetchCurrentItemsRemoved
0 → 100644
View file @
32146c9e
This diff is collapsed.
Click to expand it.
profiling/callgrind/callgrind.SyncWimaFetchDirtyMoved
0 → 100644
View file @
32146c9e
This diff is collapsed.
Click to expand it.
src/FlightDisplay/FlightDisplayViewMap.qml
View file @
32146c9e
...
...
@@ -228,7 +228,7 @@ FlightMap {
color
:
"
gray
"
}
// current Items
WimaPlanMapItems
{
/*
WimaPlanMapItems {
map: flightMap
largeMapView: _mainIsMap
missionItems: wimaController.currentMissionItems
...
...
@@ -237,7 +237,7 @@ FlightMap {
zOrderWP: QGroundControl.zOrderWaypointIndicators-1
zOrderLines: QGroundControl.zOrderWaypointIndicators-2
color: "green" // gray with alpha 0.7
}
}
*/
// Add trajectory points to the map
MapItemView
{
...
...
src/FlightMap/MapItems/PlanMapItems.qml
View file @
32146c9e
...
...
@@ -34,7 +34,6 @@ Item {
// Add the mission item visuals to the map
Repeater
{
property
bool
show
:
largeMapView
property
var
wimaController
model
:
show
?
_missionController
.
visualItems
:
0
delegate
:
MissionItemMapVisual
{
...
...
src/MissionManager/MissionController.cc
View file @
32146c9e
...
...
@@ -331,6 +331,27 @@ void MissionController::convertToKMLDocument(QDomDocument& document)
kml
.
save
(
document
);
}
//QList<QObject *> MissionController::takeVisualItems()
//{
// QList<QObject *> objectList;
// if (_visualItems) {
// _deinitAllVisualItems();
// QList<QObject *> *objectListPt = _visualItems->objectList();
// for (auto object : *objectListPt)
// objectList.append(object);
// _visualItems->clear();
// _visualItems->deleteLater();
// _settingsItem = nullptr;
// _visualItems = new QmlObjectListModel(this);
// _addMissionSettings(_visualItems, false /* addToCenter */);
// _initAllVisualItems();
// setDirty(true);
// _resetMissionFlightStatus();
// }
// return objectList;
//}
void
MissionController
::
sendItemsToVehicle
(
Vehicle
*
vehicle
,
QmlObjectListModel
*
visualMissionItems
)
{
if
(
vehicle
)
{
...
...
@@ -438,7 +459,7 @@ int MissionController::insertSimpleMissionItem(const QList<const MissionItem *>
return
(
newItem
!=
nullptr
)
?
newItem
->
sequenceNumber
()
:
-
1
;
}
int
MissionController
::
insertSimpleMissionItem
(
SimpleMissionItem
&
missionItem
,
int
i
)
/*
int MissionController::insertSimpleMissionItem(SimpleMissionItem &missionItem, int i)
{
int sequenceNumber = _nextSequenceNumber();
SimpleMissionItem * newItem = new SimpleMissionItem(missionItem, _flyView, this);
...
...
@@ -455,7 +476,7 @@ int MissionController::insertSimpleMissionItem(SimpleMissionItem &missionItem, i
_visualItems->insert(i, newItem);
return newItem->sequenceNumber();
}
}
*/
int
MissionController
::
insertROIMissionItem
(
QGeoCoordinate
coordinate
,
int
i
)
{
...
...
src/MissionManager/MissionController.h
View file @
32146c9e
...
...
@@ -122,7 +122,7 @@ public:
/// Add a new simple mission item to the list
/// @param i: index to insert at
/// @return Sequence number for new item
int
insertSimpleMissionItem
(
SimpleMissionItem
&
missionItem
,
int
i
);
//
int insertSimpleMissionItem(SimpleMissionItem &missionItem, int i);
/// Add a new ROI mission item to the list
/// @param i: index to insert at
...
...
@@ -196,6 +196,7 @@ public:
// Property accessors
QmlObjectListModel
*
visualItems
(
void
)
{
return
_visualItems
;
}
//QList<QObject *> takeVisualItems (void);
QmlObjectListModel
*
waypointLines
(
void
)
{
return
&
_waypointLines
;
}
QVariantList
waypointPath
(
void
)
{
return
_waypointPath
;
}
QStringList
complexMissionItemNames
(
void
)
const
;
...
...
src/Wima/WimaController.cc
View file @
32146c9e
This diff is collapsed.
Click to expand it.
src/Wima/WimaController.h
View file @
32146c9e
...
...
@@ -44,9 +44,7 @@ public:
Q_PROPERTY
(
QString
fileExtension
READ
fileExtension
CONSTANT
)
Q_PROPERTY
(
WimaDataContainer
*
dataContainer
READ
dataContainer
WRITE
setDataContainer
NOTIFY
dataContainerChanged
)
Q_PROPERTY
(
QmlObjectListModel
*
missionItems
READ
missionItems
NOTIFY
missionItemsChanged
)
Q_PROPERTY
(
QmlObjectListModel
*
currentMissionItems
READ
currentMissionItems
NOTIFY
currentMissionItemsChanged
)
Q_PROPERTY
(
QVariantList
waypointPath
READ
waypointPath
NOTIFY
waypointPathChanged
)
Q_PROPERTY
(
QVariantList
currentWaypointPath
READ
currentWaypointPath
NOTIFY
currentWaypointPathChanged
)
Q_PROPERTY
(
Fact
*
enableWimaController
READ
enableWimaController
CONSTANT
)
Q_PROPERTY
(
Fact
*
overlapWaypoints
READ
overlapWaypoints
CONSTANT
)
Q_PROPERTY
(
Fact
*
maxWaypointsPerPhase
READ
maxWaypointsPerPhase
CONSTANT
)
...
...
@@ -75,9 +73,7 @@ public:
QGCMapPolygon
joinedArea
(
void
)
const
;
WimaDataContainer
*
dataContainer
(
void
);
QmlObjectListModel
*
missionItems
(
void
);
QmlObjectListModel
*
currentMissionItems
(
void
);
QVariantList
waypointPath
(
void
);
QVariantList
currentWaypointPath
(
void
);
Fact
*
enableWimaController
(
void
);
Fact
*
overlapWaypoints
(
void
);
Fact
*
maxWaypointsPerPhase
(
void
);
...
...
@@ -157,9 +153,7 @@ signals:
void
dataContainerChanged
();
void
readyForSaveSendChanged
(
bool
ready
);
void
missionItemsChanged
(
void
);
void
currentMissionItemsChanged
(
void
);
void
waypointPathChanged
(
void
);
void
currentWaypointPathChanged
(
void
);
void
uploadOverrideRequiredChanged
(
void
);
void
phaseDistanceChanged
(
void
);
void
phaseDurationChanged
(
void
);
...
...
@@ -171,7 +165,6 @@ private slots:
bool
fetchContainerData
();
bool
calcNextPhase
(
void
);
void
updateWaypointPath
(
void
);
void
updateCurrentPath
(
void
);
void
updateNextWaypoint
(
void
);
void
recalcCurrentPhase
(
void
);
bool
setTakeoffLandPosition
(
void
);
...
...
@@ -205,11 +198,8 @@ private:
WimaCorridorData
_corridor
;
// corridor connecting opArea and serArea
bool
_localPlanDataValid
;
QmlObjectListModel
_missionItems
;
// all mission itmes (Mission Items) generaded by wimaPlaner, displayed in flightView
QmlObjectListModel
_currentMissionItems
;
// contains the current mission items, which are a sub set of _missionItems,
// _currentMissionItems contains a number of mission items which can be worked off with a single battery chrage
QmlObjectListModel
_missionItemsBuffer
;
// Buffer to store mission items, e.g. for storing _currentMissionItems when smartRTL() is invoked
QmlObjectListModel
_missionItemsBuffer
;
// Buffer to store mission items, e.g. for storing _missionController->visualItems() when smartRTL() is invoked
QVariantList
_waypointPath
;
// path connecting the items in _missionItems
QVariantList
_currentWaypointPath
;
// path connecting the items in _currentMissionItems
QGeoCoordinate
_takeoffLandPostion
;
...
...
@@ -227,9 +217,9 @@ private:
SettingsFact
_reverse
;
// Reverses the phase direction. Phases go from high to low waypoint numbers, if true.
int
_endWaypointIndex
;
// index of the mission item stored in _missionItems defining the last element
// (which is not part of the return path) of _
currentMissionItem
// (which is not part of the return path) of _
missionController.visualItems()
int
_startWaypointIndex
;
// index of the mission item stored in _missionItems defining the first element
// (which is not part of the arrival path) of _
currentMissionItem
// (which is not part of the arrival path) of _
missionController.visualItems()
bool
_uploadOverrideRequired
;
// Is set to true if uploadToVehicle() did not suceed because the vehicle is not inside the service area.
// The user can override the upload lock with a slider, this will reset this variable to false.
double
_measurementPathLength
;
// the lenght of the phase in meters
...
...
@@ -269,9 +259,6 @@ private:
* 3+n+m+2+l Return Path Waypoint l-1
* 3+n+m+2+l+1 Land command
*
* _currentMissionItems is equal to
* _missionController.visualItems() except that it
* is missing the MissionSettingsItem
*/
src/Wima/WimaPlaner.cc
View file @
32146c9e
...
...
@@ -715,6 +715,10 @@ QSharedPointer<WimaPlanData> WimaPlaner::toPlanData()
QList
<
MissionItem
*>
rgMissionItems
;
QmlObjectListModel
*
visualItems
=
_missionController
->
visualItems
();
MissionController
::
convertToMissionItems
(
visualItems
,
rgMissionItems
,
nullptr
);
for
(
int
i
=
0
;
i
<=
_arrivalPathLength
;
++
i
)
rgMissionItems
.
removeFirst
();
for
(
int
i
=
0
;
i
<
_returnPathLength
;
++
i
)
rgMissionItems
.
removeLast
();
// store mavlink commands
planData
->
append
(
rgMissionItems
);
...
...
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