SafetyComponentSummary.qml 1.61 KB
Newer Older
Don Gagne's avatar
Don Gagne committed
1
import QtQuick          2.5
2
import QtQuick.Controls 1.2
3

Don Gagne's avatar
Don Gagne committed
4 5 6 7 8
import QGroundControl.FactSystem    1.0
import QGroundControl.FactControls  1.0
import QGroundControl.Controls      1.0
import QGroundControl.Palette       1.0
import QGroundControl.ScreenTools   1.0
9

10
FactPanel {
Don Gagne's avatar
Don Gagne committed
11 12 13 14
    id:     panel
    width:  grid.width
    height: grid.height
    color:  qgcPal.windowShade
Don Gagne's avatar
Don Gagne committed
15 16 17 18 19 20 21 22 23

    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")
24

Don Gagne's avatar
Don Gagne committed
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
    Grid {
        id:         grid
        rows:       5
        columns:    2
        spacing:    ScreenTools.defaultFontPixelWidth / 2

        QGCLabel { text: "RTL min alt:" }
        QGCLabel { text: returnAltFact.valueString }

        QGCLabel { text: "RTL home alt:" }
        QGCLabel { text: descendAltFact.valueString }

        QGCLabel { text: "RTL loiter delay:" }
        QGCLabel { text: landDelayFact.value < 0 ? "Disabled" : landDelayFact.valueString }

        QGCLabel { text: "Telemetry loss RTL:" }
        QGCLabel { text: commDLLossFact.value != -1 ? "Disabled" : commDLLossFact.valueString }

        QGCLabel { text: "RC loss RTL (seconds):" }
        QGCLabel { text: commRCLossFact.valueString }
45 46
    }
}