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
1baa72ac
Commit
1baa72ac
authored
Apr 03, 2017
by
Don Gagne
Committed by
GitHub
Apr 03, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4914 from DonLakeFlyer/PlanGeoFence
Fix plan view geofence display
parents
eaaeab0c
e5d8d11c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
MissionController.cc
src/MissionManager/MissionController.cc
+14
-0
MissionController.h
src/MissionManager/MissionController.h
+3
-0
No files found.
src/MissionManager/MissionController.cc
View file @
1baa72ac
...
...
@@ -1228,6 +1228,7 @@ void MissionController::_initAllVisualItems(void)
}
connect
(
_settingsItem
,
&
MissionSettingsItem
::
coordinateChanged
,
this
,
&
MissionController
::
_recalcAll
);
connect
(
_settingsItem
,
&
MissionSettingsItem
::
coordinateChanged
,
this
,
&
MissionController
::
plannedHomePositionChanged
);
for
(
int
i
=
0
;
i
<
_visualItems
->
count
();
i
++
)
{
VisualMissionItem
*
item
=
qobject_cast
<
VisualMissionItem
*>
(
_visualItems
->
get
(
i
));
...
...
@@ -1241,12 +1242,16 @@ void MissionController::_initAllVisualItems(void)
emit
visualItemsChanged
();
emit
containsItemsChanged
(
containsItems
());
emit
plannedHomePositionChanged
(
plannedHomePosition
());
_visualItems
->
setDirty
(
false
);
}
void
MissionController
::
_deinitAllVisualItems
(
void
)
{
disconnect
(
_settingsItem
,
&
MissionSettingsItem
::
coordinateChanged
,
this
,
&
MissionController
::
_recalcAll
);
disconnect
(
_settingsItem
,
&
MissionSettingsItem
::
coordinateChanged
,
this
,
&
MissionController
::
plannedHomePositionChanged
);
for
(
int
i
=
0
;
i
<
_visualItems
->
count
();
i
++
)
{
_deinitVisualItem
(
qobject_cast
<
VisualMissionItem
*>
(
_visualItems
->
get
(
i
)));
}
...
...
@@ -1583,3 +1588,12 @@ void MissionController::resumeMission(int resumeIndex)
}
_activeVehicle
->
missionManager
()
->
generateResumeMission
(
resumeIndex
);
}
QGeoCoordinate
MissionController
::
plannedHomePosition
(
void
)
const
{
if
(
_settingsItem
)
{
return
_settingsItem
->
coordinate
();
}
else
{
return
QGeoCoordinate
();
}
}
src/MissionManager/MissionController.h
View file @
1baa72ac
...
...
@@ -62,6 +62,7 @@ public:
Q_PROPERTY
(
QmlObjectListModel
*
visualItems
READ
visualItems
NOTIFY
visualItemsChanged
)
Q_PROPERTY
(
QmlObjectListModel
*
waypointLines
READ
waypointLines
NOTIFY
waypointLinesChanged
)
Q_PROPERTY
(
QStringList
complexMissionItemNames
READ
complexMissionItemNames
NOTIFY
complexMissionItemNamesChanged
)
Q_PROPERTY
(
QGeoCoordinate
plannedHomePosition
READ
plannedHomePosition
NOTIFY
plannedHomePositionChanged
)
Q_PROPERTY
(
int
resumeMissionItem
READ
resumeMissionItem
NOTIFY
resumeMissionItemChanged
)
...
...
@@ -123,6 +124,7 @@ public:
QmlObjectListModel
*
visualItems
(
void
)
{
return
_visualItems
;
}
QmlObjectListModel
*
waypointLines
(
void
)
{
return
&
_waypointLines
;
}
QStringList
complexMissionItemNames
(
void
)
const
;
QGeoCoordinate
plannedHomePosition
(
void
)
const
;
/// Returns the item index two which a mission should be resumed. -1 indicates resume mission not available.
int
resumeMissionItem
(
void
)
const
;
...
...
@@ -154,6 +156,7 @@ signals:
void
resumeMissionReady
(
void
);
void
batteryChangePointChanged
(
int
batteryChangePoint
);
void
batteriesRequiredChanged
(
int
batteriesRequired
);
void
plannedHomePositionChanged
(
QGeoCoordinate
plannedHomePosition
);
private
slots
:
void
_newMissionItemsAvailableFromVehicle
(
bool
removeAllRequested
);
...
...
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