Commit 018b244a authored by dogmaphobic's avatar dogmaphobic

Merge remote-tracking branch 'MavLink/master'

* MavLink/master:
  Add GCS Failsafe option
  Remove mission editor help panel
parents 680575c4 621e754b
...@@ -38,7 +38,6 @@ ...@@ -38,7 +38,6 @@
<file alias="MainWindowNative.qml">src/ui/MainWindowNative.qml</file> <file alias="MainWindowNative.qml">src/ui/MainWindowNative.qml</file>
<file alias="MainWindowLeftPanel.qml">src/ui/MainWindowLeftPanel.qml</file> <file alias="MainWindowLeftPanel.qml">src/ui/MainWindowLeftPanel.qml</file>
<file alias="MissionEditor.qml">src/MissionEditor/MissionEditor.qml</file> <file alias="MissionEditor.qml">src/MissionEditor/MissionEditor.qml</file>
<file alias="MissionEditorHelp.qml">src/MissionEditor/MissionEditorHelp.qml</file>
<file alias="PowerComponent.qml">src/AutoPilotPlugins/PX4/PowerComponent.qml</file> <file alias="PowerComponent.qml">src/AutoPilotPlugins/PX4/PowerComponent.qml</file>
<file alias="PowerComponentSummary.qml">src/AutoPilotPlugins/PX4/PowerComponentSummary.qml</file> <file alias="PowerComponentSummary.qml">src/AutoPilotPlugins/PX4/PowerComponentSummary.qml</file>
<file alias="PX4FlowSensor.qml">src/VehicleSetup/PX4FlowSensor.qml</file> <file alias="PX4FlowSensor.qml">src/VehicleSetup/PX4FlowSensor.qml</file>
......
...@@ -40,6 +40,7 @@ QGCView { ...@@ -40,6 +40,7 @@ QGCView {
QGCPalette { id: palette; colorGroupEnabled: enabled } QGCPalette { id: palette; colorGroupEnabled: enabled }
property Fact _failsafeGCSEnable: controller.getParameterFact(-1, "FS_GCS_ENABLE")
property Fact _failsafeBattEnable: controller.getParameterFact(-1, "FS_BATT_ENABLE") property Fact _failsafeBattEnable: controller.getParameterFact(-1, "FS_BATT_ENABLE")
property Fact _failsafeBattMah: controller.getParameterFact(-1, "FS_BATT_MAH") property Fact _failsafeBattMah: controller.getParameterFact(-1, "FS_BATT_MAH")
property Fact _failsafeBattVoltage: controller.getParameterFact(-1, "FS_BATT_VOLTAGE") property Fact _failsafeBattVoltage: controller.getParameterFact(-1, "FS_BATT_VOLTAGE")
...@@ -92,6 +93,25 @@ QGCView { ...@@ -92,6 +93,25 @@ QGCView {
height: mahField.y + mahField.height + _margins height: mahField.y + mahField.height + _margins
color: palette.windowShade color: palette.windowShade
QGCLabel {
id: gcsEnableLabel
anchors.margins: _margins
anchors.left: parent.left
anchors.baseline: gcsEnableCombo.baseline
text: "Ground Station failsafe:"
}
FactComboBox {
id: gcsEnableCombo
anchors.topMargin: _margins
anchors.leftMargin: _margins
anchors.left: gcsEnableLabel.right
anchors.top: parent.top
width: voltageField.width
fact: _failsafeGCSEnable
indexModel: false
}
QGCLabel { QGCLabel {
id: throttleEnableLabel id: throttleEnableLabel
anchors.margins: _margins anchors.margins: _margins
...@@ -103,8 +123,8 @@ QGCView { ...@@ -103,8 +123,8 @@ QGCView {
QGCComboBox { QGCComboBox {
id: throttleEnableCombo id: throttleEnableCombo
anchors.topMargin: _margins anchors.topMargin: _margins
anchors.left: voltageField.left anchors.left: gcsEnableCombo.left
anchors.top: parent.top anchors.top: gcsEnableCombo.bottom
width: voltageField.width width: voltageField.width
model: ["Disabled", "Always RTL", "Continue with Mission in Auto Mode", "Always Land"] model: ["Disabled", "Always RTL", "Continue with Mission in Auto Mode", "Always Land"]
currentIndex: _failsafeThrEnable.value currentIndex: _failsafeThrEnable.value
...@@ -123,7 +143,7 @@ QGCView { ...@@ -123,7 +143,7 @@ QGCView {
FactTextField { FactTextField {
id: throttlePWMField id: throttlePWMField
anchors.topMargin: _margins / 2 anchors.topMargin: _margins / 2
anchors.left: voltageField.left anchors.left: gcsEnableCombo.left
anchors.top: throttleEnableCombo.bottom anchors.top: throttleEnableCombo.bottom
fact: _failsafeThrValue fact: _failsafeThrValue
showUnits: true showUnits: true
...@@ -140,7 +160,7 @@ QGCView { ...@@ -140,7 +160,7 @@ QGCView {
QGCComboBox { QGCComboBox {
id: batteryEnableCombo id: batteryEnableCombo
anchors.topMargin: _margins anchors.topMargin: _margins
anchors.left: voltageField.left anchors.left: gcsEnableCombo.left
anchors.top: throttlePWMField.bottom anchors.top: throttlePWMField.bottom
width: voltageField.width width: voltageField.width
model: ["Disabled", "Land", "Return to Launch"] model: ["Disabled", "Land", "Return to Launch"]
...@@ -163,8 +183,7 @@ QGCView { ...@@ -163,8 +183,7 @@ QGCView {
FactTextField { FactTextField {
id: voltageField id: voltageField
anchors.topMargin: _margins / 2 anchors.topMargin: _margins / 2
anchors.leftMargin: _margins anchors.left: gcsEnableCombo.left
anchors.left: voltageLabel.right
anchors.top: batteryEnableCombo.bottom anchors.top: batteryEnableCombo.bottom
fact: _failsafeBattVoltage fact: _failsafeBattVoltage
showUnits: true showUnits: true
...@@ -184,7 +203,7 @@ QGCView { ...@@ -184,7 +203,7 @@ QGCView {
FactTextField { FactTextField {
id: mahField id: mahField
anchors.topMargin: _margins / 2 anchors.topMargin: _margins / 2
anchors.left: voltageField.left anchors.left: gcsEnableCombo.left
anchors.top: voltageField.bottom anchors.top: voltageField.bottom
fact: _failsafeBattMah fact: _failsafeBattMah
showUnits: true showUnits: true
......
...@@ -57,7 +57,6 @@ QGCView { ...@@ -57,7 +57,6 @@ QGCView {
readonly property real _rightPanelOpacity: 0.8 readonly property real _rightPanelOpacity: 0.8
readonly property int _toolButtonCount: 6 readonly property int _toolButtonCount: 6
readonly property string _autoSyncKey: "AutoSync" readonly property string _autoSyncKey: "AutoSync"
readonly property string _showHelpKey: "ShowHelp"
readonly property int _addMissionItemsButtonAutoOffTimeout: 10000 readonly property int _addMissionItemsButtonAutoOffTimeout: 10000
readonly property var _defaultVehicleCoordinate: QtPositioning.coordinate(37.803784, -122.462276) readonly property var _defaultVehicleCoordinate: QtPositioning.coordinate(37.803784, -122.462276)
...@@ -77,12 +76,9 @@ QGCView { ...@@ -77,12 +76,9 @@ QGCView {
property bool _syncInProgress: _activeVehicle ? _activeVehicle.missionManager.inProgress : false property bool _syncInProgress: _activeVehicle ? _activeVehicle.missionManager.inProgress : false
property bool _showHelp: QGroundControl.flightMapSettings.loadBoolMapSetting(editorMap.mapName, _showHelpKey, true)
onGpsLockChanged: updateMapToVehiclePosition() onGpsLockChanged: updateMapToVehiclePosition()
Component.onCompleted: { Component.onCompleted: {
helpPanel.source = "MissionEditorHelp.qml"
updateMapToVehiclePosition() updateMapToVehiclePosition()
} }
...@@ -410,16 +406,6 @@ QGCView { ...@@ -410,16 +406,6 @@ QGCView {
} }
} }
//-- Help Panel
Loader {
id: helpPanel
width: parent.width * 0.65
height: parent.height * 0.75
z: QGroundControl.zOrderTopMost
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
}
Item { Item {
id: toolbarSpacer id: toolbarSpacer
height: mainWindow.tbHeight height: mainWindow.tbHeight
...@@ -570,14 +556,6 @@ QGCView { ...@@ -570,14 +556,6 @@ QGCView {
checked = false checked = false
} }
} }
RoundButton {
id: helpButton
buttonImage: "/qmlimages/Help.svg"
exclusiveGroup: _dropButtonsExclusiveGroup
z: QGroundControl.zOrderWidgets
checked: _showHelp
}
} }
MissionItemStatus { MissionItemStatus {
......
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2015 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
import QtQuick 2.4
import QtQuick.Controls 1.3
import QtQuick.Dialogs 1.2
import QGroundControl 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.Controls 1.0
import QGroundControl.Palette 1.0
Rectangle {
visible: helpButton.checked
color: qgcPal.window
opacity: _rightPanelOpacity
radius: ScreenTools.defaultFontPixelHeight
z: QGroundControl.zOrderTopMost
readonly property real margins: ScreenTools.defaultFontPixelHeight
Image {
anchors.margins: ScreenTools.defaultFontPixelHeight
anchors.top: parent.top
anchors.right: parent.right
width: ScreenTools.defaultFontPixelHeight * 1.5
height: ScreenTools.defaultFontPixelHeight * 1.5
source: (qgcPal.globalTheme === QGCPalette.Light) ? "/res/XDeleteBlack.svg" : "/res/XDelete.svg"
fillMode: Image.PreserveAspectFit
mipmap: true
smooth: true
MouseArea {
anchors.fill: parent
onClicked: helpButton.checked = false
}
}
Item {
anchors.margins: _margin
anchors.fill: parent
QGCLabel {
id: helpTitle
font.pixelSize: ScreenTools.mediumFontPixelSize
text: "Mission Planner"
}
QGCLabel {
id: helpIconLabel
anchors.topMargin: ScreenTools.defaultFontPixelHeight
anchors.top: helpTitle.bottom
width: parent.width
wrapMode: Text.WordWrap
text: "Mission Planner tool buttons:"
}
Image {
id: addMissionItemsHelpIcon
anchors.topMargin: ScreenTools.defaultFontPixelHeight
anchors.top: helpIconLabel.bottom
width: ScreenTools.defaultFontPixelHeight * 3
fillMode: Image.PreserveAspectFit
mipmap: true
smooth: true
source: (qgcPal.globalTheme === QGCPalette.Light) ? "/qmlimages/MapAddMissionBlack.svg" : "/qmlimages/MapAddMission.svg"
}
QGCLabel {
id: addMissionItemsHelpText
anchors.leftMargin: ScreenTools.defaultFontPixelHeight
anchors.left: mapTypeHelpIcon.right
anchors.right: parent.right
anchors.top: addMissionItemsHelpIcon.top
wrapMode: Text.WordWrap
text: "<b>Add Mission Items</b><br>" +
"When enabled, add mission items by clicking on the map."
}
Image {
id: mapCenterHelpIcon
anchors.topMargin: ScreenTools.defaultFontPixelHeight
anchors.top: addMissionItemsHelpText.bottom
width: ScreenTools.defaultFontPixelHeight * 3
fillMode: Image.PreserveAspectFit
mipmap: true
smooth: true
source: (qgcPal.globalTheme === QGCPalette.Light) ? "/qmlimages/MapCenterBlack.svg" : "/qmlimages/MapCenter.svg"
}
QGCLabel {
id: mapCenterHelpText
anchors.leftMargin: ScreenTools.defaultFontPixelHeight
anchors.left: mapTypeHelpIcon.right
anchors.right: parent.right
anchors.top: mapCenterHelpIcon.top
wrapMode: Text.WordWrap
text: "<b>Map Center</b><br>" +
"Options for centering the map."
}
Image {
id: syncHelpIcon
anchors.topMargin: ScreenTools.defaultFontPixelHeight
anchors.top: mapCenterHelpText.bottom
width: ScreenTools.defaultFontPixelHeight * 3
fillMode: Image.PreserveAspectFit
mipmap: true
smooth: true
source: (qgcPal.globalTheme === QGCPalette.Light) ? "/qmlimages/MapSyncBlack.svg" : "/qmlimages/MapSync.svg"
}
QGCLabel {
id: syncHelpText
anchors.leftMargin: ScreenTools.defaultFontPixelHeight
anchors.left: mapTypeHelpIcon.right
anchors.right: parent.right
anchors.top: syncHelpIcon.top
wrapMode: Text.WordWrap
text: "<b>Sync</b><br>" +
"Options for saving/loading mission items."
}
Image {
id: mapTypeHelpIcon
anchors.topMargin: ScreenTools.defaultFontPixelHeight
anchors.top: syncHelpText.bottom
width: ScreenTools.defaultFontPixelHeight * 3
fillMode: Image.PreserveAspectFit
mipmap: true
smooth: true
source: (qgcPal.globalTheme === QGCPalette.Light) ? "/qmlimages/MapTypeBlack.svg" : "/qmlimages/MapType.svg"
}
QGCLabel {
id: mapTypeHelpText
anchors.leftMargin: ScreenTools.defaultFontPixelHeight
anchors.left: mapTypeHelpIcon.right
anchors.right: parent.right
anchors.top: mapTypeHelpIcon.top
wrapMode: Text.WordWrap
text: "<b>Map Type</b><br>" +
"Map type options."
}
QGCCheckBox {
anchors.left: parent.left
anchors.bottom: parent.bottom
anchors.margins: _margin
checked: !_showHelp
text: "Don't show me again"
onClicked: QGroundControl.flightMapSettings.saveBoolMapSetting(editorMap.mapName, _showHelpKey, !checked)
}
}
}
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