QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
APMFailsafesComponentSummarySub.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Controls
3
4import QGroundControl
5import QGroundControl.FactControls
6import QGroundControl.Controls
7
8Item {
9 anchors.fill: parent
10
11 property bool _firmware34: globals.activeVehicle.versionCompare(3, 5, 0) < 0
12
13 FactPanelController { id: controller; }
14
15 property Fact _failsafeBatteryEnable: controller.getParameterFact(-1, "BATT_FS_LOW_ACT", false)
16 property Fact _failsafeEKFEnable: controller.getParameterFact(-1, "FS_EKF_ACTION")
17 property Fact _failsafeGCSEnable: controller.getParameterFact(-1, "FS_GCS_ENABLE")
18 property Fact _failsafeLeakEnable: controller.getParameterFact(-1, "FS_LEAK_ENABLE")
19 property Fact _failsafePilotEnable: _firmware34 ? null : controller.getParameterFact(-1, "FS_PILOT_INPUT")
20 property Fact _failsafeTemperatureEnable: controller.getParameterFact(-1, "FS_TEMP_ENABLE")
21 property Fact _failsafePressureEnable: controller.getParameterFact(-1, "FS_PRESS_ENABLE")
22
23 Column {
24 anchors.fill: parent
25
26 VehicleSummaryRow {
27 labelText: qsTr("GCS failsafe:")
28 valueText: _failsafeGCSEnable.enumOrValueString
29 }
30 VehicleSummaryRow {
31 labelText: qsTr("Leak failsafe:")
32 valueText: _failsafeLeakEnable.enumOrValueString
33 }
34 VehicleSummaryRow {
35 visible: !_firmware34
36 labelText: qsTr("Battery failsafe:")
37 valueText: {
38 if (_firmware34) {
39 return "Firmware not supported"
40 }
41 if (!_failsafeBatteryEnable) {
42 return "Disabled"
43 }
44 return _failsafeBatteryEnable.enumOrValueString
45 }
46 }
47 VehicleSummaryRow {
48 visible: !_firmware34
49 labelText: qsTr("EKF failsafe:")
50 valueText: _firmware34 ? "" : _failsafeEKFEnable.enumOrValueString
51 }
52 VehicleSummaryRow {
53 visible: !_firmware34
54 labelText: qsTr("Pilot Input failsafe:")
55 valueText: _firmware34 ? "" : _failsafePilotEnable.enumOrValueString
56 }
57 VehicleSummaryRow {
58 labelText: qsTr("Int. Temperature failsafe:")
59 valueText: _failsafeTemperatureEnable.enumOrValueString
60 }
61 VehicleSummaryRow {
62 labelText: qsTr("Int. Pressure failsafe:")
63 valueText: _failsafePressureEnable.enumOrValueString
64 }
65 }
66}