Commit 621e754b authored by Don Gagne's avatar Don Gagne

Merge pull request #2592 from DonLakeFlyer/Falisafe

Add GCS Failsafe option
parents 5d41ea66 fefc3fc4
...@@ -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
......
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