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

Fly: Show missions from all vehicles

parent 0686feca
...@@ -98,7 +98,7 @@ QGCView { ...@@ -98,7 +98,7 @@ QGCView {
} }
} }
PlanElemementMasterController { PlanMasterController {
id: masterController id: masterController
Component.onCompleted: start(false /* editMode */) Component.onCompleted: start(false /* editMode */)
} }
...@@ -249,6 +249,7 @@ QGCView { ...@@ -249,6 +249,7 @@ QGCView {
flightWidgets: flightDisplayViewWidgets flightWidgets: flightDisplayViewWidgets
rightPanelWidth: ScreenTools.defaultFontPixelHeight * 9 rightPanelWidth: ScreenTools.defaultFontPixelHeight * 9
qgcView: root qgcView: root
multiVehicleView: !singleVehicleView.checked
scaleState: (_mainIsMap && flyViewOverlay.item) ? (flyViewOverlay.item.scaleState ? flyViewOverlay.item.scaleState : "bottomMode") : "bottomMode" scaleState: (_mainIsMap && flyViewOverlay.item) ? (flyViewOverlay.item.scaleState ? flyViewOverlay.item.scaleState : "bottomMode") : "bottomMode"
} }
} }
......
...@@ -39,6 +39,7 @@ FlightMap { ...@@ -39,6 +39,7 @@ FlightMap {
property var flightWidgets property var flightWidgets
property var rightPanelWidth property var rightPanelWidth
property var qgcView ///< QGCView control which contains this map 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) property rect centerViewport: Qt.rect(0, 0, width, height)
...@@ -206,11 +207,23 @@ FlightMap { ...@@ -206,11 +207,23 @@ FlightMap {
} }
} }
// Add the items associated with the flight place to the map // Add the items associated with each vehicles flight plan to the map
PlanMapItems { Repeater {
map: flightMap model: QGroundControl.multiVehicleManager.vehicles
largeMapView: _mainIsMap
masterController: _planMasterController PlanMapItems {
map: flightMap
largeMapView: _mainIsMap
masterController: masterController
isActiveVehicle: _vehicle.active
property var _vehicle: object
PlanMasterController {
id: masterController
Component.onCompleted: startStaticActiveVehicle(object)
}
}
} }
GeoFenceMapVisuals { GeoFenceMapVisuals {
......
...@@ -22,6 +22,7 @@ Item { ...@@ -22,6 +22,7 @@ Item {
property var map ///< Map control to show items on 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 bool largeMapView ///< true: map takes up entire view, false: map is in small window
property var masterController ///< Reference to PlanMasterController for vehicle 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 _map: map
property var _missionController: masterController.missionController property var _missionController: masterController.missionController
...@@ -35,11 +36,16 @@ Item { ...@@ -35,11 +36,16 @@ Item {
delegate: MissionItemMapVisual { delegate: MissionItemMapVisual {
map: _map 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 { Instantiator {
model: largeMapView ? _missionController.waypointLines : 0 model: largeMapView ? _missionController.waypointLines : 0
......
...@@ -144,7 +144,7 @@ QGCView { ...@@ -144,7 +144,7 @@ QGCView {
} }
} }
PlanElemementMasterController { PlanMasterController {
id: masterController id: masterController
Component.onCompleted: { Component.onCompleted: {
......
...@@ -365,7 +365,7 @@ void QGCApplication::_initCommon(void) ...@@ -365,7 +365,7 @@ void QGCApplication::_initCommon(void)
qmlRegisterType<ParameterEditorController> ("QGroundControl.Controllers", 1, 0, "ParameterEditorController"); qmlRegisterType<ParameterEditorController> ("QGroundControl.Controllers", 1, 0, "ParameterEditorController");
qmlRegisterType<ESP8266ComponentController> ("QGroundControl.Controllers", 1, 0, "ESP8266ComponentController"); qmlRegisterType<ESP8266ComponentController> ("QGroundControl.Controllers", 1, 0, "ESP8266ComponentController");
qmlRegisterType<ScreenToolsController> ("QGroundControl.Controllers", 1, 0, "ScreenToolsController"); 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<ValuesWidgetController> ("QGroundControl.Controllers", 1, 0, "ValuesWidgetController");
qmlRegisterType<QGCFileDialogController> ("QGroundControl.Controllers", 1, 0, "QGCFileDialogController"); qmlRegisterType<QGCFileDialogController> ("QGroundControl.Controllers", 1, 0, "QGCFileDialogController");
qmlRegisterType<RCChannelMonitorController> ("QGroundControl.Controllers", 1, 0, "RCChannelMonitorController"); 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