SafetyComponentSummary.qml 1.75 KB
Newer Older
1
import QtQuick 2.2
2
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 21

    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 commDLLossFact:   controller.getParameterFact(-1, "COM_DL_LOSS_EN")
    property Fact commRCLossFact:   controller.getParameterFact(-1, "COM_RC_LOSS_T")
22

23 24 25 26 27 28
    Column {
        anchors.fill:       parent
        anchors.margins:    8

        VehicleSummaryRow {
            labelText: "RTL min alt:"
dogmaphobic's avatar
dogmaphobic committed
29
            valueText: returnAltFact ? returnAltFact.valueString : ""
30 31 32 33
        }

        VehicleSummaryRow {
            labelText: "RTL home alt:"
dogmaphobic's avatar
dogmaphobic committed
34
            valueText: descendAltFact ? descendAltFact.valueString : ""
35 36 37 38
        }

        VehicleSummaryRow {
            labelText: "RTL loiter delay:"
dogmaphobic's avatar
dogmaphobic committed
39
            valueText: landDelayFact ? (landDelayFact.value < 0 ? "Disabled" : landDelayFact.valueString) : ""
40 41 42 43
        }

        VehicleSummaryRow {
            labelText: "Telemetry loss RTL:"
dogmaphobic's avatar
dogmaphobic committed
44
            valueText: commDLLossFact ? (commDLLossFact.value != -1 ? "Disabled" : commDLLossFact.valueString) : ""
45 46 47 48
        }

        VehicleSummaryRow {
            labelText: "RC loss RTL (seconds):"
dogmaphobic's avatar
dogmaphobic committed
49
            valueText: commRCLossFact ? commRCLossFact.valueString : ""
50
        }
51 52
    }
}