Browse Source

Fly: Show missions from all vehicles

QGC4.4
Don Gagne 8 years ago
parent
commit
6f6439cb5e
  1. 3
      src/FlightDisplay/FlightDisplayView.qml
  2. 23
      src/FlightDisplay/FlightDisplayViewMap.qml
  3. 10
      src/FlightMap/MapItems/PlanMapItems.qml
  4. 2
      src/PlanView/PlanView.qml
  5. 2
      src/QGCApplication.cc

3
src/FlightDisplay/FlightDisplayView.qml

@ -98,7 +98,7 @@ QGCView { @@ -98,7 +98,7 @@ QGCView {
}
}
PlanElemementMasterController {
PlanMasterController {
id: masterController
Component.onCompleted: start(false /* editMode */)
}
@ -249,6 +249,7 @@ QGCView { @@ -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"
}
}

23
src/FlightDisplay/FlightDisplayViewMap.qml

@ -39,6 +39,7 @@ FlightMap { @@ -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 { @@ -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 {

10
src/FlightMap/MapItems/PlanMapItems.qml

@ -22,6 +22,7 @@ Item { @@ -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 { @@ -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

2
src/PlanView/PlanView.qml

@ -144,7 +144,7 @@ QGCView { @@ -144,7 +144,7 @@ QGCView {
}
}
PlanElemementMasterController {
PlanMasterController {
id: masterController
Component.onCompleted: {

2
src/QGCApplication.cc

@ -365,7 +365,7 @@ void QGCApplication::_initCommon(void) @@ -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");

Loading…
Cancel
Save