PX4RadioComponentSummary.qml 2.32 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
13

Don Gagne's avatar
Don Gagne committed
14 15 16 17 18 19 20 21 22 23
    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")
24

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

29 30
        VehicleSummaryRow {
            labelText: "Roll:"
dogmaphobic's avatar
dogmaphobic committed
31
            valueText: mapRollFact ? (mapRollFact.value === 0 ? "Setup required" : mapRollFact.valueString) : ""
32
        }
33

34 35
        VehicleSummaryRow {
            labelText: "Pitch:"
dogmaphobic's avatar
dogmaphobic committed
36
            valueText: mapPitchFact ? (mapPitchFact.value === 0 ? "Setup required" : mapPitchFact.valueString) : ""
37
        }
38

39 40
        VehicleSummaryRow {
            labelText: "Yaw:"
dogmaphobic's avatar
dogmaphobic committed
41
            valueText: mapYawFact ? (mapYawFact.value === 0 ? "Setup required" : mapYawFact.valueString) : ""
42
        }
43

44 45
        VehicleSummaryRow {
            labelText: "Throttle:"
dogmaphobic's avatar
dogmaphobic committed
46
            valueText: mapThrottleFact ? (mapThrottleFact.value === 0 ? "Setup required" : mapThrottleFact.valueString) : ""
47
        }
48

49 50
        VehicleSummaryRow {
            labelText: "Flaps:"
dogmaphobic's avatar
dogmaphobic committed
51
            valueText: mapFlapsFact ? (mapFlapsFact.value === 0 ? "Disabled" : mapFlapsFact.valueString) : ""
52
        }
53

54 55
        VehicleSummaryRow {
            labelText: "Aux1:"
dogmaphobic's avatar
dogmaphobic committed
56
            valueText: mapAux1Fact ? (mapAux1Fact.value === 0 ? "Disabled" : mapAux1Fact.valueString) : ""
57
        }
58

59 60
        VehicleSummaryRow {
            labelText: "Aux2:"
dogmaphobic's avatar
dogmaphobic committed
61
            valueText: mapAux2Fact ? (mapAux2Fact.value === 0 ? "Disabled" : mapAux2Fact.valueString) : ""
62
        }
63 64
    }
}