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
f84781fa
Commit
f84781fa
authored
Aug 11, 2017
by
Don Gagne
Committed by
GitHub
Aug 11, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5553 from DonLakeFlyer/PlanMapItems
Encapsulate Fly view map items into PlanMapItems control
parents
72ac8f8a
1dbacddf
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
89 additions
and
19 deletions
+89
-19
qgroundcontrol.qrc
qgroundcontrol.qrc
+1
-0
FlightDisplayViewMap.qml
src/FlightDisplay/FlightDisplayViewMap.qml
+5
-13
GuidedActionsController.qml
src/FlightDisplay/GuidedActionsController.qml
+4
-5
PlanMapItems.qml
src/FlightMap/MapItems/PlanMapItems.qml
+74
-0
qmldir
src/FlightMap/qmldir
+1
-0
MockLinkMissionItemHandler.cc
src/comm/MockLinkMissionItemHandler.cc
+4
-1
No files found.
qgroundcontrol.qrc
View file @
f84781fa
...
...
@@ -152,6 +152,7 @@
<file alias="QGroundControl/FlightMap/MissionItemIndicatorDrag.qml">src/FlightMap/MapItems/MissionItemIndicatorDrag.qml</file>
<file alias="QGroundControl/FlightMap/MissionItemView.qml">src/FlightMap/MapItems/MissionItemView.qml</file>
<file alias="QGroundControl/FlightMap/MissionLineView.qml">src/FlightMap/MapItems/MissionLineView.qml</file>
<file alias="QGroundControl/FlightMap/PlanMapItems.qml">src/FlightMap/MapItems/PlanMapItems.qml</file>
<file alias="QGroundControl/FlightMap/PolygonEditor.qml">src/FlightMap/MapItems/PolygonEditor.qml</file>
<file alias="QGroundControl/FlightMap/QGCArtificialHorizon.qml">src/FlightMap/Widgets/QGCArtificialHorizon.qml</file>
<file alias="QGroundControl/FlightMap/QGCAttitudeHUD.qml">src/FlightMap/Widgets/QGCAttitudeHUD.qml</file>
...
...
src/FlightDisplay/FlightDisplayViewMap.qml
View file @
f84781fa
...
...
@@ -206,19 +206,11 @@ FlightMap {
}
}
// Add the mission item visuals to the map
Repeater
{
model
:
_mainIsMap
?
_missionController
.
visualItems
:
0
delegate
:
MissionItemMapVisual
{
// Add the items associated with the flight place to the map
PlanMapItems
{
map
:
flightMap
onClicked
:
guidedActionsController
.
confirmAction
(
guidedActionsController
.
actionSetWaypoint
,
Math
.
max
(
object
.
sequenceNumber
,
1
))
}
}
// Add lines between waypoints
MissionLineView
{
model
:
_mainIsMap
?
_missionController
.
waypointLines
:
0
largeMapView
:
_mainIsMap
masterController
:
_planMasterController
}
GeoFenceMapVisuals
{
...
...
src/FlightDisplay/GuidedActionsController.qml
View file @
f84781fa
...
...
@@ -122,8 +122,8 @@ Item {
property
bool
_hideOrbit
:
!
QGroundControl
.
corePlugin
.
options
.
guidedBarShowOrbit
property
bool
_vehicleWasFlying
:
false
//
This is a temporary hack to debug a problem with RTL and Pause being disabled at the wrong time
//
Handy code for debugging state problems
/*
property bool __guidedModeSupported: _activeVehicle ? _activeVehicle.guidedModeSupported : false
property bool __pauseVehicleSupported: _activeVehicle ? _activeVehicle.pauseVehicleSupported : false
property bool __flightMode: _flightMode
...
...
@@ -140,11 +140,10 @@ Item {
on__FlightModeChanged: _outputState()
on__GuidedModeSupportedChanged: _outputState()
on__PauseVehicleSupportedChanged: _outputState()
// End of hack
*/
on_VehicleFlyingChanged
:
{
_outputState
()
//
_outputState()
if
(
!
_vehicleFlying
)
{
// We use _vehicleWasFLying to help trigger Resume Mission only if the vehicle actually flew and came back down.
// Otherwise it may trigger during the Start Mission sequence due to signal ordering or armed and resume mission index.
...
...
src/FlightMap/MapItems/PlanMapItems.qml
0 → 100644
View file @
f84781fa
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
import
QtQuick
2.3
import
QtLocation
5.3
import
QtPositioning
5.3
import
QGroundControl
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
FlightMap
1.0
// Adds visual items associated with the Flight Plan to the map
Item
{
id
:
_root
property
var
map
///< Map control to show items on
property
bool
largeMapView
///< true: map takes up entire view, false: map is in small window
property
var
masterController
///< Reference to PlanMasterController for vehicle
property
var
_map
:
map
property
var
_missionController
:
masterController
.
missionController
property
var
_geoFenceController
:
masterController
.
geoFenceController
property
var
_rallyPointController
:
masterController
.
rallyPointController
property
var
_missionLineViewComponent
// Add the mission item visuals to the map
Repeater
{
model
:
largeMapView
?
_missionController
.
visualItems
:
0
delegate
:
MissionItemMapVisual
{
map
:
_map
onClicked
:
guidedActionsController
.
confirmAction
(
guidedActionsController
.
actionSetWaypoint
,
Math
.
max
(
object
.
sequenceNumber
,
1
))
}
}
// Waypiont lines
Instantiator
{
model
:
largeMapView
?
_missionController
.
waypointLines
:
0
Item
{
property
var
_missionLineViewComponent
Component.onCompleted
:
{
_missionLineViewComponent
=
missionLineViewComponent
.
createObject
(
map
,
{
"
object
"
:
object
})
if
(
_missionLineViewComponent
.
status
===
Component
.
Error
)
console
.
log
(
_missionLineViewComponent
.
errorString
())
map
.
addMapItem
(
_missionLineViewComponent
)
}
Component.onDestruction
:
{
_missionLineViewComponent
.
destroy
()
}
}
}
Component
{
id
:
missionLineViewComponent
MapPolyline
{
line.width
:
3
line.color
:
"
#be781c
"
// Hack, can't get palette to work in here
z
:
QGroundControl
.
zOrderWaypointLines
path
:
object
?
[
object
.
coordinate1
,
object
.
coordinate2
]
:
undefined
property
var
object
}
}
}
src/FlightMap/qmldir
View file @
f84781fa
...
...
@@ -27,5 +27,6 @@ MissionItemIndicator 1.0 MissionItemIndicator.qml
MissionItemIndicatorDrag 1.0 MissionItemIndicatorDrag.qml
MissionItemView 1.0 MissionItemView.qml
MissionLineView 1.0 MissionLineView.qml
PlanMapItems 1.0 PlanMapItems.qml
PolygonEditor 1.0 PolygonEditor.qml
VehicleMapItem 1.0 VehicleMapItem.qml
src/comm/MockLinkMissionItemHandler.cc
View file @
f84781fa
...
...
@@ -70,8 +70,11 @@ bool MockLinkMissionItemHandler::handleMessage(const mavlink_message_t& msg)
break
;
case
MAVLINK_MSG_ID_MISSION_CLEAR_ALL
:
// Delete all
missio
n items
// Delete all
pla
n items
_missionItems
.
clear
();
_fenceItems
.
clear
();
_rallyItems
.
clear
();
_sendAck
(
MAV_MISSION_ACCEPTED
);
break
;
default:
...
...
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