Commit 6f6439cb authored by Don Gagne's avatar Don Gagne

Fly: Show missions from all vehicles

parent 0686feca
......@@ -98,7 +98,7 @@ QGCView {
}
}
PlanElemementMasterController {
PlanMasterController {
id: masterController
Component.onCompleted: start(false /* editMode */)
}
......@@ -249,6 +249,7 @@ QGCView {
flightWidgets: flightDisplayViewWidgets
rightPanelWidth: ScreenTools.defaultFontPixelHeight * 9
qgcView: root
multiVehicleView: !singleVehicleView.checked
scaleState: (_mainIsMap && flyViewOverlay.item) ? (flyViewOverlay.item.scaleState ? flyViewOverlay.item.scaleState : "bottomMode") : "bottomMode"
}
}
......
......@@ -39,6 +39,7 @@ FlightMap {
property var flightWidgets
property var rightPanelWidth
property var qgcView ///< QGCView control which contains this map
property var multiVehicleView ///< true: multi-vehicle view, false: single vehicle view
property rect centerViewport: Qt.rect(0, 0, width, height)
......@@ -206,11 +207,23 @@ FlightMap {
}
}
// Add the items associated with the flight place to the map
PlanMapItems {
map: flightMap
largeMapView: _mainIsMap
masterController: _planMasterController
// Add the items associated with each vehicles flight plan to the map
Repeater {
model: QGroundControl.multiVehicleManager.vehicles
PlanMapItems {
map: flightMap
largeMapView: _mainIsMap
masterController: masterController
isActiveVehicle: _vehicle.active
property var _vehicle: object
PlanMasterController {
id: masterController
Component.onCompleted: startStaticActiveVehicle(object)
}
}
}
GeoFenceMapVisuals {
......
......@@ -22,6 +22,7 @@ Item {
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 bool isActiveVehicle ///< true: vehicle associated with plan is active, false: in-active
property var _map: map
property var _missionController: masterController.missionController
......@@ -35,11 +36,16 @@ Item {
delegate: MissionItemMapVisual {
map: _map
onClicked: guidedActionsController.confirmAction(guidedActionsController.actionSetWaypoint, Math.max(object.sequenceNumber, 1))
onClicked: {
if (isActiveVehicle) {
// Only active vehicle supports click to change current mission item
guidedActionsController.confirmAction(guidedActionsController.actionSetWaypoint, Math.max(object.sequenceNumber, 1))
}
}
}
}
// Waypiont lines
// Waypoint lines
Instantiator {
model: largeMapView ? _missionController.waypointLines : 0
......
......@@ -144,7 +144,7 @@ QGCView {
}
}
PlanElemementMasterController {
PlanMasterController {
id: masterController
Component.onCompleted: {
......
......@@ -365,7 +365,7 @@ void QGCApplication::_initCommon(void)
qmlRegisterType<ParameterEditorController> ("QGroundControl.Controllers", 1, 0, "ParameterEditorController");
qmlRegisterType<ESP8266ComponentController> ("QGroundControl.Controllers", 1, 0, "ESP8266ComponentController");
qmlRegisterType<ScreenToolsController> ("QGroundControl.Controllers", 1, 0, "ScreenToolsController");
qmlRegisterType<PlanMasterController> ("QGroundControl.Controllers", 1, 0, "PlanElemementMasterController");
qmlRegisterType<PlanMasterController> ("QGroundControl.Controllers", 1, 0, "PlanMasterController");
qmlRegisterType<ValuesWidgetController> ("QGroundControl.Controllers", 1, 0, "ValuesWidgetController");
qmlRegisterType<QGCFileDialogController> ("QGroundControl.Controllers", 1, 0, "QGCFileDialogController");
qmlRegisterType<RCChannelMonitorController> ("QGroundControl.Controllers", 1, 0, "RCChannelMonitorController");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment