diff --git a/src/AutoPilotPlugins/APM/APMSafetyComponentSub.qml b/src/AutoPilotPlugins/APM/APMSafetyComponentSub.qml index 9c52761c0f0d6a6bb9d42bc983dba21fb760a525..592798e84d799962275aa525c9c8d8437d7cd61e 100644 --- a/src/AutoPilotPlugins/APM/APMSafetyComponentSub.qml +++ b/src/AutoPilotPlugins/APM/APMSafetyComponentSub.qml @@ -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") diff --git a/src/AutoPilotPlugins/APM/APMSafetyComponentSummarySub.qml b/src/AutoPilotPlugins/APM/APMSafetyComponentSummarySub.qml index 161a1d42021f53d516cefcedc5f19df26ebffce2..fa4f216270f2383c78b46c4f8f8bdaa416d0d63f 100644 --- a/src/AutoPilotPlugins/APM/APMSafetyComponentSummarySub.qml +++ b/src/AutoPilotPlugins/APM/APMSafetyComponentSummarySub.qml @@ -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 { 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:")