Commit 83537695 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #5315 from jaxxzer/pr-fix-34-safety-setup

Fix for Safety setup backwards compatability on Sub-3.4
parents 246f2d4b 29d32083
......@@ -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")
......
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 {
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 {
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:")
......
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