Unverified Commit 1887e93d authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #8719 from DonLakeFlyer/FlyViewEncapsulation

More work on encapsulation in Fly View
parents d95cb35f 6794e035
......@@ -194,12 +194,16 @@
<file alias="QGroundControl/FlightDisplay/FlightDisplayViewMap.qml">src/FlightDisplay/FlightDisplayViewMap.qml</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayViewVideo.qml">src/FlightDisplay/FlightDisplayViewVideo.qml</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayViewWidgets.qml">src/FlightDisplay/FlightDisplayViewWidgets.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyViewAirspaceIndicator.qml">src/FlightDisplay/FlyViewAirspaceIndicator.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyViewMissionCompleteDialog.qml">src/FlightDisplay/FlyViewMissionCompleteDialog.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyViewPreFlightChecklistPopup.qml">src/FlightDisplay/FlyViewPreFlightChecklistPopup.qml</file>
<file alias="QGroundControl/FlightDisplay/FlyViewToolStrip.qml">src/FlightDisplay/FlyViewToolStrip.qml</file>
<file alias="QGroundControl/FlightDisplay/GuidedActionConfirm.qml">src/FlightDisplay/GuidedActionConfirm.qml</file>
<file alias="QGroundControl/FlightDisplay/GuidedActionList.qml">src/FlightDisplay/GuidedActionList.qml</file>
<file alias="QGroundControl/FlightDisplay/GuidedActionsController.qml">src/FlightDisplay/GuidedActionsController.qml</file>
<file alias="QGroundControl/FlightDisplay/GuidedAltitudeSlider.qml">src/FlightDisplay/GuidedAltitudeSlider.qml</file>
<file alias="QGroundControl/FlightDisplay/MultiVehicleList.qml">src/FlightDisplay/MultiVehicleList.qml</file>
<file alias="QGroundControl/FlightDisplay/MultiVehiclePanel.qml">src/FlightDisplay/MultiVehiclePanel.qml</file>
<file alias="QGroundControl/FlightDisplay/PreFlightBatteryCheck.qml">src/FlightDisplay/PreFlightBatteryCheck.qml</file>
<file alias="QGroundControl/FlightDisplay/PreFlightGPSCheck.qml">src/FlightDisplay/PreFlightGPSCheck.qml</file>
<file alias="QGroundControl/FlightDisplay/PreFlightRCCheck.qml">src/FlightDisplay/PreFlightRCCheck.qml</file>
......
This diff is collapsed.
......@@ -39,13 +39,13 @@ FlightMap {
property var guidedActionsController
property var flightWidgets
property var rightPanelWidth
property var multiVehicleView ///< true: multi-vehicle view, false: single vehicle view
property var missionController: null
property var planMasterController
property rect centerViewport: Qt.rect(0, 0, width, height)
property var _geoFenceController: missionController.geoFenceController
property var _rallyPointController: missionController.rallyPointController
property var _planMasterController: planMasterController
property var _geoFenceController: planMasterController.geoFenceController
property var _rallyPointController: planMasterController.rallyPointController
property var _activeVehicleCoordinate: activeVehicle ? activeVehicle.coordinate : QtPositioning.coordinate()
property real _toolButtonTopMargin: parent.height - mainWindow.height + (ScreenTools.defaultFontPixelHeight / 2)
property bool _airspaceEnabled: QGroundControl.airmapSupported ? (QGroundControl.settingsManager.airMapSettings.enableAirMap.rawValue && QGroundControl.airspaceManager.connected): false
......@@ -200,10 +200,10 @@ FlightMap {
QGCMapPalette { id: mapPal; lightColors: isSatelliteMap }
Connections {
target: missionController
target: _missionController
ignoreUnknownSignals: true
onNewItemsFromVehicle: {
var visualItems = missionController.visualItems
var visualItems = _missionController.visualItems
if (visualItems && visualItems.count !== 1) {
mapFitFunctions.fitMapViewportToMissionItems()
firstVehiclePositionReceived = true
......@@ -215,7 +215,7 @@ FlightMap {
id: mapFitFunctions // The name for this id cannot be changed without breaking references outside of this code. Beware!
map: mainWindow.flightDisplayMap
usePlannedHomePosition: false
planMasterController: missionController
planMasterController: _planMasterController
property real leftToolWidth: toolStrip.x + toolStrip.width
}
......@@ -271,10 +271,10 @@ FlightMap {
model: QGroundControl.multiVehicleManager.vehicles
PlanMapItems {
map: flightMap
largeMapView: mainIsMap
masterController: masterController
vehicle: _vehicle
map: flightMap
largeMapView: mainIsMap
planMasterController: _planMasterController
vehicle: _vehicle
property var _vehicle: object
......
/****************************************************************************
*
* (c) 2009-2020 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.12
import QtQuick.Controls 2.4
import QGroundControl 1.0
import QGroundControl.Airspace 1.0
import QGroundControl.Controls 1.0
import QGroundControl.Palette 1.0
import QGroundControl.ScreenTools 1.0
Rectangle {
id: _root
width: airspaceRow.width + (ScreenTools.defaultFontPixelWidth * 3)
height: airspaceRow.height * 1.25
color: qgcPal.globalTheme === QGCPalette.Light ? Qt.rgba(1,1,1,0.95) : Qt.rgba(0,0,0,0.75)
visible: show && QGroundControl.airmapSupported && _flightPermit && _flightPermit !== AirspaceFlightPlanProvider.PermitNone
radius: 3
border.width: 1
border.color: qgcPal.globalTheme === QGCPalette.Light ? Qt.rgba(0,0,0,0.35) : Qt.rgba(1,1,1,0.35)
property bool show: false
property var _flightPermit: QGroundControl.airmapSupported ? QGroundControl.airspaceManager.flightPlan.flightPermitStatus : null
property string _providerName: QGroundControl.airspaceManager.providerName
QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
Row {
id: airspaceRow
spacing: ScreenTools.defaultFontPixelWidth
anchors.centerIn: parent
QGCLabel { text: _providerName+":"; anchors.verticalCenter: parent.verticalCenter; }
QGCLabel {
text: {
if(_flightPermit) {
if(_flightPermit === AirspaceFlightPlanProvider.PermitPending)
return qsTr("Approval Pending")
if(_flightPermit === AirspaceFlightPlanProvider.PermitAccepted || _flightPermit === AirspaceFlightPlanProvider.PermitNotRequired)
return qsTr("Flight Approved")
if(_flightPermit === AirspaceFlightPlanProvider.PermitRejected)
return qsTr("Flight Rejected")
}
return ""
}
color: {
if(_flightPermit) {
if(_flightPermit === AirspaceFlightPlanProvider.PermitPending)
return qgcPal.colorOrange
if(_flightPermit === AirspaceFlightPlanProvider.PermitAccepted || _flightPermit === AirspaceFlightPlanProvider.PermitNotRequired)
return qgcPal.colorGreen
}
return qgcPal.colorRed
}
anchors.verticalCenter: parent.verticalCenter;
}
}
}
/****************************************************************************
*
* (c) 2009-2020 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.12
import QtQuick.Controls 2.4
import QtQuick.Dialogs 1.3
import QtQuick.Layouts 1.12
import QGroundControl 1.0
import QGroundControl.Controls 1.0
import QGroundControl.Palette 1.0
import QGroundControl.ScreenTools 1.0
/// Dialog which shows up when a flight completes. Prompts the user for things like whether they should remove the plan from the vehicle.
Item {
visible: false
property var missionController
property var geoFenceController
property var rallyPointController
property var guidedController
// The following code is used to track vehicle states for showing the mission complete dialog
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property bool _vehicleArmed: _activeVehicle ? _activeVehicle.armed : true // true here prevents pop up from showing during shutdown
property bool _vehicleWasArmed: false
property bool _vehicleInMissionFlightMode: _activeVehicle ? (_activeVehicle.flightMode === _activeVehicle.missionFlightMode) : false
property bool _vehicleWasInMissionFlightMode: false
property bool _showMissionCompleteDialog: _vehicleWasArmed && _vehicleWasInMissionFlightMode &&
(missionController.containsItems || geoFenceController.containsItems || rallyPointController.containsItems ||
(_activeVehicle ? _activeVehicle.cameraTriggerPoints.count !== 0 : false))
on_VehicleArmedChanged: {
if (_vehicleArmed) {
_vehicleWasArmed = true
_vehicleWasInMissionFlightMode = _vehicleInMissionFlightMode
} else {
if (_showMissionCompleteDialog) {
mainWindow.showComponentDialog(missionCompleteDialogComponent, qsTr("Flight Plan complete"), mainWindow.showDialogDefaultWidth, StandardButton.Close)
}
_vehicleWasArmed = false
_vehicleWasInMissionFlightMode = false
}
}
on_VehicleInMissionFlightModeChanged: {
if (_vehicleInMissionFlightMode && _vehicleArmed) {
_vehicleWasInMissionFlightMode = true
}
}
Component {
id: missionCompleteDialogComponent
QGCViewDialog {
property var activeVehicleCopy: _activeVehicle
onActiveVehicleCopyChanged:
if (!activeVehicleCopy) {
hideDialog()
}
QGCFlickable {
anchors.fill: parent
contentHeight: column.height
ColumnLayout {
id: column
anchors.margins: _margins
anchors.left: parent.left
anchors.right: parent.right
spacing: ScreenTools.defaultFontPixelHeight
QGCLabel {
Layout.fillWidth: true
text: qsTr("%1 Images Taken").arg(_activeVehicle.cameraTriggerPoints.count)
horizontalAlignment: Text.AlignHCenter
visible: _activeVehicle.cameraTriggerPoints.count !== 0
}
QGCButton {
Layout.fillWidth: true
text: qsTr("Remove plan from vehicle")
visible: !_activeVehicle.connectionLost// && !_activeVehicle.apmFirmware // ArduPilot has a bug somewhere with mission clear
onClicked: {
_planController.removeAllFromVehicle()
hideDialog()
}
}
QGCButton {
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
text: qsTr("Leave plan on vehicle")
onClicked: hideDialog()
}
Rectangle {
Layout.fillWidth: true
color: qgcPal.text
height: 1
}
ColumnLayout {
Layout.fillWidth: true
spacing: ScreenTools.defaultFontPixelHeight
visible: !_activeVehicle.connectionLost && guidedController.showResumeMission
QGCButton {
Layout.fillWidth: true
Layout.alignment: Qt.AlignHCenter
text: qsTr("Resume Mission From Waypoint %1").arg(guidedController._resumeMissionIndex)
onClicked: {
guidedController.executeAction(guidedController.actionResumeMission, null, null)
hideDialog()
}
}
QGCLabel {
Layout.fillWidth: true
wrapMode: Text.WordWrap
text: qsTr("Resume Mission will rebuild the current mission from the last flown waypoint and upload it to the vehicle for the next flight.")
}
}
QGCLabel {
Layout.fillWidth: true
wrapMode: Text.WordWrap
color: qgcPal.warningText
text: qsTr("If you are changing batteries for Resume Mission do not disconnect from the vehicle.")
visible: guidedController.showResumeMission
}
}
}
}
}
}
/****************************************************************************
*
* (c) 2009-2020 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.11
import QtQuick.Controls 2.4
import QGroundControl 1.0
import QGroundControl.Vehicle 1.0
/// Popup container for preflight checklists
Popup {
id: _root
height: checkList.height
width: checkList.width
modal: true
focus: true
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
background: Rectangle {
anchors.fill: parent
color: Qt.rgba(0,0,0,0)
clip: true
}
property bool useChecklist: QGroundControl.settingsManager.appSettings.useChecklist.rawValue && QGroundControl.corePlugin.options.preFlightChecklistUrl.toString().length
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property bool _enforceChecklist: useChecklist && QGroundControl.settingsManager.appSettings.enforceChecklist.rawValue
property bool _checklistComplete: _activeVehicle && (_activeVehicle.checkListState === Vehicle.CheckListPassed)
on_ActiveVehicleChanged: _showPreFlightChecklistIfNeeded()
Connections {
target: mainWindow
onShowPreFlightChecklistIfNeeded: _root._showPreFlightChecklistIfNeeded()
}
function _showPreFlightChecklistIfNeeded() {
if (_activeVehicle && !_checklistComplete && _enforceChecklist) {
popupTimer.restart()
}
}
Timer {
id: popupTimer
interval: 1000
repeat: false
onTriggered: {
// FIXME: What was the visible check in here for
if (!_checklistComplete) {
console.log("open", _root.width, _root.height)
_root.open()
} else {
_root.close()
}
}
}
Loader {
id: checkList
anchors.centerIn: parent
source: QGroundControl.corePlugin.options.preFlightChecklistUrl
}
property alias checkListItem: checkList.item
Connections {
target: checkList.item
onAllChecksPassedChanged: {
if (target.allChecksPassed) {
popupTimer.restart()
}
}
}
}
......@@ -13,9 +13,11 @@ import QGroundControl.Controls 1.0
ToolStrip {
title: qsTr("Fly")
property var guidedActionsController
property var guidedActionList
property var preFlightCheckList
property var guidedActionsController
property var guidedActionList
property bool usePreFlightChecklist
signal displayPreFlightChecklist
property bool _anyActionAvailable: guidedActionsController.showStartMission || guidedActionsController.showResumeMission || guidedActionsController.showChangeAlt || guidedActionsController.showLandAbort
property var _actionModel: [
......@@ -49,8 +51,8 @@ ToolStrip {
{
name: "Checklist",
iconSource: "/qmlimages/check.svg",
buttonVisible: _useChecklist,
buttonEnabled: _useChecklist && activeVehicle && !activeVehicle.armed,
buttonVisible: usePreFlightChecklist,
buttonEnabled: usePreFlightChecklist && activeVehicle && !activeVehicle.armed,
},
{
name: guidedActionsController.takeoffTitle,
......@@ -91,7 +93,7 @@ ToolStrip {
onClicked: {
if(index === 0) {
preFlightCheckList.open()
displayPreFlightChecklist()
} else {
guidedActionsController.closeAll()
var action = model[index].action
......
......@@ -239,6 +239,40 @@ Item {
_vehicleInMissionMode = activeVehicle ? _flightMode === activeVehicle.missionFlightMode : false // Must be last to get correct signalling for showStartMission popups
}
Connections {
target: missionController
onResumeMissionUploadFail: confirmAction(actionResumeMissionUploadFail)
}
Connections {
target: mainWindow
onArmVehicleRequest: armVehicleRequest()
onDisarmVehicleRequest: disarmVehicleRequest()
onVtolTransitionToFwdFlightRequest: vtolTransitionToFwdFlightRequest()
onVtolTransitionToMRFlightRequest: vtolTransitionToMRFlightRequest()
}
function armVehicleRequest() {
confirmAction(actionArm)
}
function disarmVehicleRequest() {
if (showEmergenyStop) {
confirmAction(actionEmergencyStop)
} else {
confirmAction(actionDisarm)
}
}
function vtolTransitionToFwdFlightRequest() {
confirmAction(actionVtolTransitionToFwdFlight)
}
function vtolTransitionToMRFlightRequest() {
confirmAction(actionVtolTransitionToMRFlight)
}
function closeAll() {
confirmDialog.visible = false
actionList.visible = false
......
/****************************************************************************
*
* (c) 2009-2020 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.12
import QtQuick.Controls 2.4
import QtQuick.Layouts 1.12
import QGroundControl 1.0
import QGroundControl.Controls 1.0
import QGroundControl.FlightDisplay 1.0
import QGroundControl.ScreenTools 1.0
/// Multi vehicle panel for Fly View
Item {
id: _root
width: ScreenTools.defaultFontPixelWidth * 30
height: singleVehiclePanel ? selectorRow.height : availableHeight
visible: QGroundControl.multiVehicleManager.vehicles.count > 1 && QGroundControl.corePlugin.options.enableMultiVehicleList
property alias singleVehiclePanel: singleVehicleView.checked
property real availableHeight
property var guidedActionsController
Row {
id: selectorRow
spacing: ScreenTools.defaultFontPixelWidth
QGCRadioButton {
id: singleVehicleView
text: qsTr("Single")
checked: true
textColor: mapPal.text
}
QGCRadioButton {
text: qsTr("Multi-Vehicle")
textColor: mapPal.text
}
}
MultiVehicleList {
anchors.topMargin: ScreenTools.defaultFontPixelHeight / 2
anchors.top: selectorRow.bottom
anchors.bottom: parent.bottom
width: parent.width
visible: !singleVehiclePanel && !QGroundControl.videoManager.fullScreen && QGroundControl.corePlugin.options.enableMultiVehicleList
guidedActionsController: _root.guidedActionsController
}
}
......@@ -19,7 +19,7 @@ import QGroundControl.Vehicle 1.0
Rectangle {
width: mainColumn.width + ScreenTools.defaultFontPixelWidth * 3
height: Math.min(availableHeight - (_verticalMargin * 2), mainColumn.height + ScreenTools.defaultFontPixelHeight)
height: Math.min(mainWindow.availableHeight - (_verticalMargin * 2), mainColumn.height + ScreenTools.defaultFontPixelHeight)
color: qgcPal.windowShade
radius: 3
......
......@@ -20,10 +20,10 @@ import QGroundControl.FlightMap 1.0
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 vehicle ///< Vehicle associated with these items
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 planMasterController ///< Reference to PlanMasterController for vehicle
property var vehicle ///< Vehicle associated with these items
property var _map: map
property var _vehicle: vehicle
......
Module QGroundControl.FlightDisplay
FlightDisplayView 1.0 FlightDisplayView.qml
FlightDisplayViewMap 1.0 FlightDisplayViewMap.qml
FlightDisplayViewVideo 1.0 FlightDisplayViewVideo.qml
FlightDisplayViewWidgets 1.0 FlightDisplayViewWidgets.qml
FlyViewToolStrip 1.0 FlyViewToolStrip.qml
GuidedActionConfirm 1.0 GuidedActionConfirm.qml
GuidedActionList 1.0 GuidedActionList.qml
GuidedActionsController 1.0 GuidedActionsController.qml
GuidedAltitudeSlider 1.0 GuidedAltitudeSlider.qml
MultiVehicleList 1.0 MultiVehicleList.qml
PreFlightBatteryCheck 1.0 PreFlightBatteryCheck.qml
PreFlightGPSCheck 1.0 PreFlightGPSCheck.qml
PreFlightRCCheck 1.0 PreFlightRCCheck.qml
PreFlightSensorsHealthCheck 1.0 PreFlightSensorsHealthCheck.qml
PreFlightSoundCheck 1.0 PreFlightSoundCheck.qml
TerrainProgress 1.0 TerrainProgress.qml
FlightDisplayView 1.0 FlightDisplayView.qml
FlightDisplayViewMap 1.0 FlightDisplayViewMap.qml
FlightDisplayViewVideo 1.0 FlightDisplayViewVideo.qml
FlightDisplayViewWidgets 1.0 FlightDisplayViewWidgets.qml
FlyViewAirspaceIndicator 1.0 FlyViewAirspaceIndicator.qml
FlyViewMissionCompleteDialog 1.0 FlyViewMissionCompleteDialog.qml
FlyViewPreFlightChecklistPopup 1.0 FlyViewPreFlightChecklistPopup.qml
FlyViewToolStrip 1.0 FlyViewToolStrip.qml
GuidedActionConfirm 1.0 GuidedActionConfirm.qml
GuidedActionList 1.0 GuidedActionList.qml
GuidedActionsController 1.0 GuidedActionsController.qml
GuidedAltitudeSlider 1.0 GuidedAltitudeSlider.qml
MultiVehicleList 1.0 MultiVehicleList.qml
MultiVehiclePanel 1.0 MultiVehiclePanel.qml
PreFlightBatteryCheck 1.0 PreFlightBatteryCheck.qml
PreFlightGPSCheck 1.0 PreFlightGPSCheck.qml
PreFlightRCCheck 1.0 PreFlightRCCheck.qml
PreFlightSensorsHealthCheck 1.0 PreFlightSensorsHealthCheck.qml
PreFlightSoundCheck 1.0 PreFlightSoundCheck.qml
TerrainProgress 1.0 TerrainProgress.qml
......@@ -32,7 +32,7 @@ ApplicationWindow {
Component.onCompleted: {
//-- Full screen on mobile or tiny screens
if(ScreenTools.isMobile || Screen.height / ScreenTools.realPixelDensity < 120) {
if (ScreenTools.isMobile || Screen.height / ScreenTools.realPixelDensity < 120) {
mainWindow.showFullScreen()
} else {
width = ScreenTools.isMobile ? Screen.width : Math.min(250 * Screen.pixelDensity, Screen.width)
......@@ -40,8 +40,10 @@ ApplicationWindow {
}
// Startup experience wizard and provide the source using QGCCorePlugin
if(QGroundControl.settingsManager.appSettings.firstTimeStart.value) {
if (QGroundControl.settingsManager.appSettings.firstTimeStart.value) {
startupPopup.open()
} else {
showPreFlightChecklistIfNeeded()
}
}
......@@ -78,10 +80,11 @@ ApplicationWindow {
//-------------------------------------------------------------------------
//-- Actions
signal armVehicle
signal disarmVehicle
signal vtolTransitionToFwdFlight
signal vtolTransitionToMRFlight
signal armVehicleRequest
signal disarmVehicleRequest
signal vtolTransitionToFwdFlightRequest
signal vtolTransitionToMRFlightRequest
signal showPreFlightChecklistIfNeeded
//-------------------------------------------------------------------------
//-- Global Scope Functions
......@@ -120,9 +123,8 @@ ApplicationWindow {
function showFlyView() {
if (!flightView.visible) {
flightView.showPreflightChecklistIfNeeded()
mainWindow.showPreFlightChecklistIfNeeded()
}
viewSwitch(false)
flightView.visible = true
}
......@@ -694,32 +696,32 @@ ApplicationWindow {
//-- Startup PopUp wizard
Popup {
id: startupPopup
anchors.centerIn: parent
id: startupPopup
anchors.centerIn: parent
width: Math.min(startupWizard.implicitWidth, mainWindow.width - 2 * startupPopup._horizontalSpacing)
height: Math.min(startupWizard.implicitHeight, mainWindow.availableHeight - 2 * startupPopup._verticalSpacing)
modal: true
focus: true
closePolicy: (startupWizard && startupWizard.forceKeepingOpen !== undefined && startupWizard.forceKeepingOpen) ? Popup.NoAutoClose : Popup.CloseOnEscape | Popup.CloseOnPressOutside
width: Math.min(startupWizard.implicitWidth, mainWindow.width - 2 * startupPopup._horizontalSpacing)
height: Math.min(startupWizard.implicitHeight, mainWindow.availableHeight - 2 * startupPopup._verticalSpacing)
onClosed: mainWindow.showPreFlightChecklistIfNeeded()
property real _horizontalSpacing: ScreenTools.defaultFontPixelWidth * 5
property real _verticalSpacing: ScreenTools.defaultFontPixelHeight * 2
modal: true
focus: true
closePolicy: (startupWizard && startupWizard.forceKeepingOpen !== undefined && startupWizard.forceKeepingOpen) ? Popup.NoAutoClose : Popup.CloseOnEscape | Popup.CloseOnPressOutside
Connections {
target: startupWizard
onCloseView: startupPopup.close()
target: startupWizard
onCloseView: startupPopup.close()
}
background: Rectangle {
radius: ScreenTools.defaultFontPixelHeight * 0.5
color: qgcPal.window
color: qgcPal.window
}
StartupWizard {
id: startupWizard
anchors.fill: parent
id: startupWizard
anchors.fill: parent
}
}
}
......@@ -34,9 +34,9 @@ QGCComboBox {
onActivated: {
if (index == 0) {
mainWindow.armVehicle()
mainWindow.armVehicleRequest()
} else {
mainWindow.disarmVehicle()
mainWindow.disarmVehicleRequest()
}
currentIndex = -1
}
......
......@@ -35,11 +35,11 @@ QGCComboBox {
onActivated: {
if (index == 0) {
if (_fwdFlight) {
mainWindow.vtolTransitionToMRFlight()
mainWindow.vtolTransitionToMRFlightRequest()
}
} else {
if (!_fwdFlight) {
mainWindow.vtolTransitionToFwdFlight()
mainWindow.vtolTransitionToFwdFlightRequest()
}
}
currentIndex = -1
......
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