PX4RadioComponentSummary.qml 2.08 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
15

Don Gagne's avatar
Don Gagne committed
16 17 18 19 20 21 22 23 24 25
    QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
    FactPanelController { id: controller; factPanel: panel }

    property Fact mapRollFact:      controller.getParameterFact(-1, "RC_MAP_ROLL")
    property Fact mapPitchFact:     controller.getParameterFact(-1, "RC_MAP_PITCH")
    property Fact mapYawFact:       controller.getParameterFact(-1, "RC_MAP_YAW")
    property Fact mapThrottleFact:  controller.getParameterFact(-1, "RC_MAP_THROTTLE")
    property Fact mapFlapsFact:     controller.getParameterFact(-1, "RC_MAP_FLAPS")
    property Fact mapAux1Fact:      controller.getParameterFact(-1, "RC_MAP_AUX1")
    property Fact mapAux2Fact:      controller.getParameterFact(-1, "RC_MAP_AUX2")
26

Don Gagne's avatar
Don Gagne committed
27 28 29 30 31
    Grid {
        id:         grid
        rows:       7
        columns:    2
        spacing:    ScreenTools.defaultFontPixelWidth / 2
32

Don Gagne's avatar
Don Gagne committed
33 34
        QGCLabel { text: "Roll:" }
        QGCLabel { text: mapRollFact.value == 0 ? "Setup required" : mapRollFact.valueString }
35

Don Gagne's avatar
Don Gagne committed
36 37
        QGCLabel { text: "Pitch:" }
        QGCLabel { text: mapPitchFact.value == 0 ? "Setup required" : mapPitchFact.valueString }
38

Don Gagne's avatar
Don Gagne committed
39 40
        QGCLabel { text: "Yaw:" }
        QGCLabel { text: mapYawFact.value == 0 ? "Setup required" : mapYawFact.valueString }
41

Don Gagne's avatar
Don Gagne committed
42 43
        QGCLabel { text: "Throttle:" }
        QGCLabel { text: mapThrottleFact.value == 0 ? "Setup required" : mapThrottleFact.valueString }
44

Don Gagne's avatar
Don Gagne committed
45 46
        QGCLabel { text: "Flaps:" }
        QGCLabel { text: mapFlapsFact.value == 0 ? "Disabled" : mapFlapsFact.valueString }
47

Don Gagne's avatar
Don Gagne committed
48 49
        QGCLabel { text: "Aux1:" }
        QGCLabel { text: mapAux1Fact.value == 0 ? "Disabled" : mapAux1Fact.valueString }
50

Don Gagne's avatar
Don Gagne committed
51 52
        QGCLabel { text: "Aux2:" }
        QGCLabel { text: mapAux2Fact.value == 0 ? "Disabled" : mapAux2Fact.valueString }
53 54
    }
}