QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
SafetyComponentSummary.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 FactPanelController { id: controller; }
12
13 property Fact returnAltFact: controller.getParameterFact(-1, "RTL_RETURN_ALT")
14 property Fact _descendAltFact: controller.getParameterFact(-1, "RTL_DESCEND_ALT")
15 property Fact landDelayFact: controller.getParameterFact(-1, "RTL_LAND_DELAY")
16 property Fact commRCLossFact: controller.getParameterFact(-1, "COM_RC_LOSS_T")
17 property Fact lowBattAction: controller.getParameterFact(-1, "COM_LOW_BAT_ACT")
18 property Fact rcLossAction: controller.getParameterFact(-1, "NAV_RCL_ACT")
19 property Fact dataLossAction: controller.getParameterFact(-1, "NAV_DLL_ACT")
20 property Fact _rtlLandDelayFact: controller.getParameterFact(-1, "RTL_LAND_DELAY")
21 property int _rtlLandDelayValue: _rtlLandDelayFact.value
22
23 Column {
24 anchors.fill: parent
25
26 VehicleSummaryRow {
27 labelText: qsTr("Low Battery Failsafe")
28 valueText: lowBattAction ? lowBattAction.enumStringValue : ""
29 }
30
31 VehicleSummaryRow {
32 labelText: qsTr("RC Loss Failsafe")
33 valueText: rcLossAction ? rcLossAction.enumStringValue : ""
34 }
35
36 VehicleSummaryRow {
37 labelText: qsTr("RC Loss Timeout")
38 valueText: commRCLossFact ? commRCLossFact.valueString + " " + commRCLossFact.units : ""
39 }
40
41 VehicleSummaryRow {
42 labelText: qsTr("Data Link Loss Failsafe")
43 valueText: dataLossAction ? dataLossAction.enumStringValue : ""
44 }
45
46 VehicleSummaryRow {
47 labelText: qsTr("RTL Climb To")
48 valueText: returnAltFact ? returnAltFact.valueString + " " + returnAltFact.units : ""
49 }
50
51 VehicleSummaryRow {
52 labelText: qsTr("RTL, Then")
53 valueText: _rtlLandDelayValue === 0 ?
54 qsTr("Land immediately") :
55 (_rtlLandDelayValue < 0 ?
56 qsTr("Loiter and do not land") :
57 qsTr("Loiter and land after specified time"))
58
59 }
60
61 VehicleSummaryRow {
62 labelText: qsTr("Loiter Alt")
63 valueText: _descendAltFact.valueString + " " + _descendAltFact.units
64 visible: _rtlLandDelayValue !== 0
65 }
66
67 VehicleSummaryRow {
68 labelText: qsTr("Land Delay")
69 valueText: _rtlLandDelayValue + " " + _rtlLandDelayFact.units
70 visible: _rtlLandDelayValue > 0
71 }
72 }
73}