SafetyComponentSummary.qml 2.06 KB
Newer Older
1 2
import QtQuick 2.3
import QtQuick.Controls 1.2
3

4 5 6 7
import QGroundControl.FactSystem 1.0
import QGroundControl.FactControls 1.0
import QGroundControl.Controls 1.0
import QGroundControl.Palette 1.0
8

9
FactPanel {
10 11 12
    id:             panel
    anchors.fill:   parent
    color:          qgcPal.windowShadeDark
Don Gagne's avatar
Don Gagne committed
13 14 15 16 17 18 19 20

    QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
    FactPanelController { id: controller; factPanel: panel }

    property Fact returnAltFact:    controller.getParameterFact(-1, "RTL_RETURN_ALT")
    property Fact descendAltFact:   controller.getParameterFact(-1, "RTL_DESCEND_ALT")
    property Fact landDelayFact:    controller.getParameterFact(-1, "RTL_LAND_DELAY")
    property Fact commRCLossFact:   controller.getParameterFact(-1, "COM_RC_LOSS_T")
21 22 23
    property Fact lowBattAction:    controller.getParameterFact(-1, "COM_LOW_BAT_ACT")
    property Fact rcLossAction:     controller.getParameterFact(-1, "NAV_RCL_ACT")
    property Fact dataLossAction:   controller.getParameterFact(-1, "NAV_DLL_ACT")
24

25 26 27 28
    Column {
        anchors.fill:       parent

        VehicleSummaryRow {
29
            labelText: qsTr("RTL min alt:")
Don Gagne's avatar
Don Gagne committed
30
            valueText: returnAltFact ? returnAltFact.valueString + " " + returnAltFact.units : ""
31 32 33
        }

        VehicleSummaryRow {
34
            labelText: qsTr("RTL home alt:")
Don Gagne's avatar
Don Gagne committed
35
            valueText: descendAltFact ? descendAltFact.valueString + " " + descendAltFact.units : ""
36 37 38
        }

        VehicleSummaryRow {
Don Gagne's avatar
Don Gagne committed
39 40
            labelText: qsTr("RC loss RTL:")
            valueText: commRCLossFact ? commRCLossFact.valueString + " " + commRCLossFact.units : ""
41 42 43
        }

        VehicleSummaryRow {
44 45
            labelText: qsTr("RC loss action:")
            valueText: rcLossAction ? rcLossAction.enumStringValue : ""
46 47 48
        }

        VehicleSummaryRow {
49 50
            labelText: qsTr("Link loss action:")
            valueText: dataLossAction ? dataLossAction.enumStringValue : ""
51
        }
52 53 54 55 56 57

        VehicleSummaryRow {
            labelText: qsTr("Low battery action:")
            valueText: lowBattAction ? lowBattAction.enumStringValue : ""
        }

58 59
    }
}