Browse Source

Fix for Safety setup backwards compatability on Sub-3.4

QGC4.4
Jacob Walser 8 years ago
parent
commit
29d3208328
  1. 4
      src/AutoPilotPlugins/APM/APMSafetyComponentSub.qml
  2. 23
      src/AutoPilotPlugins/APM/APMSafetyComponentSummarySub.qml

4
src/AutoPilotPlugins/APM/APMSafetyComponentSub.qml

@ -43,14 +43,14 @@ SetupPage { @@ -43,14 +43,14 @@ SetupPage {
property Fact _failsafeEKFEnable: controller.getParameterFact(-1, "FS_EKF_ACTION")
property Fact _failsafeGCSEnable: controller.getParameterFact(-1, "FS_GCS_ENABLE")
property Fact _failsafeLeakEnable: controller.getParameterFact(-1, "FS_LEAK_ENABLE")
property Fact _failsafePilotEnable: controller.getParameterFact(-1, "FS_PILOT_INPUT")
property Fact _failsafePilotEnable: _firmware34 ? null : controller.getParameterFact(-1, "FS_PILOT_INPUT")
property Fact _failsafePressureEnable: controller.getParameterFact(-1, "FS_PRESS_ENABLE")
property Fact _failsafeTemperatureEnable: controller.getParameterFact(-1, "FS_TEMP_ENABLE")
// Threshold parameters
property Fact _failsafePressureThreshold: controller.getParameterFact(-1, "FS_PRESS_MAX")
property Fact _failsafeTemperatureThreshold: controller.getParameterFact(-1, "FS_TEMP_MAX")
property Fact _failsafePilotTimeout: controller.getParameterFact(-1, "FS_PILOT_TIMEOUT")
property Fact _failsafePilotTimeout: _firmware34 ? null : controller.getParameterFact(-1, "FS_PILOT_TIMEOUT")
property Fact _failsafeLeakPin: controller.getParameterFact(-1, "LEAK1_PIN")
property Fact _failsafeLeakLogic: controller.getParameterFact(-1, "LEAK1_LOGIC")
property Fact _failsafeEKFThreshold: controller.getParameterFact(-1, "FS_EKF_THRESH")

23
src/AutoPilotPlugins/APM/APMSafetyComponentSummarySub.qml

@ -1,16 +1,20 @@ @@ -1,16 +1,20 @@
import QtQuick 2.3
import QtQuick.Controls 1.2
import QGroundControl.FactSystem 1.0
import QGroundControl 1.0
import QGroundControl.FactSystem 1.0
import QGroundControl.FactControls 1.0
import QGroundControl.Controls 1.0
import QGroundControl.Palette 1.0
import QGroundControl.Controls 1.0
import QGroundControl.Palette 1.0
FactPanel {
id: panel
anchors.fill: parent
color: qgcPal.windowShadeDark
property var _activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
property bool _firmware34: _activeVehicle.firmwareMajorVersion == 3 && _activeVehicle.firmwareMinorVersion == 4
QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
FactPanelController { id: controller; factPanel: panel }
@ -19,14 +23,14 @@ FactPanel { @@ -19,14 +23,14 @@ FactPanel {
property Fact _failsafeEKFEnable: controller.getParameterFact(-1, "FS_EKF_ACTION")
property Fact _failsafeGCSEnable: controller.getParameterFact(-1, "FS_GCS_ENABLE")
property Fact _failsafeLeakEnable: controller.getParameterFact(-1, "FS_LEAK_ENABLE")
property Fact _failsafePilotEnable: controller.getParameterFact(-1, "FS_PILOT_INPUT")
property Fact _failsafePilotEnable: _firmware34 ? null : controller.getParameterFact(-1, "FS_PILOT_INPUT")
property Fact _failsafePressureEnable: controller.getParameterFact(-1, "FS_PRESS_ENABLE")
property Fact _failsafeTemperatureEnable: controller.getParameterFact(-1, "FS_TEMP_ENABLE")
// Threshold parameters
property Fact _failsafePressureThreshold: controller.getParameterFact(-1, "FS_PRESS_MAX")
property Fact _failsafeTemperatureThreshold: controller.getParameterFact(-1, "FS_TEMP_MAX")
property Fact _failsafePilotTimeout: controller.getParameterFact(-1, "FS_PILOT_TIMEOUT")
property Fact _failsafePilotTimeout: _firmware34 ? null : controller.getParameterFact(-1, "FS_PILOT_TIMEOUT")
property Fact _failsafeLeakPin: controller.getParameterFact(-1, "LEAK1_PIN")
property Fact _failsafeLeakLogic: controller.getParameterFact(-1, "LEAK1_LOGIC")
property Fact _failsafeEKFThreshold: controller.getParameterFact(-1, "FS_EKF_THRESH")
@ -51,16 +55,19 @@ FactPanel { @@ -51,16 +55,19 @@ FactPanel {
valueText: _failsafeLeakEnable.enumOrValueString
}
VehicleSummaryRow {
visible: !_firmware34
labelText: qsTr("Battery failsafe:")
valueText: _failsafeBatteryEnable.enumOrValueString
valueText: _firmware34 ? "" : _failsafeBatteryEnable.enumOrValueString
}
VehicleSummaryRow {
visible: !_firmware34
labelText: qsTr("EKF failsafe:")
valueText: _failsafeEKFEnable.enumOrValueString
valueText: _firmware34 ? "" : _failsafeEKFEnable.enumOrValueString
}
VehicleSummaryRow {
visible: !_firmware34
labelText: qsTr("Pilot Input failsafe:")
valueText: _failsafePilotEnable.enumOrValueString
valueText: _firmware34 ? "" : _failsafePilotEnable.enumOrValueString
}
VehicleSummaryRow {
labelText: qsTr("Int. Temperature failsafe:")

Loading…
Cancel
Save