PX4RadioComponentSummary.qml 2.28 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
Item {
10
    anchors.fill:   parent
11

12
    FactPanelController { id: controller; }
Don Gagne's avatar
Don Gagne committed
13 14 15 16 17 18 19 20

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

22 23
    Column {
        anchors.fill:       parent
24

25
        VehicleSummaryRow {
26
            labelText: qsTr("Roll")
27
            valueText: mapRollFact ? (mapRollFact.value === 0 ? qsTr("Setup required") : mapRollFact.valueString) : ""
28
        }
29

30
        VehicleSummaryRow {
31
            labelText: qsTr("Pitch")
32
            valueText: mapPitchFact ? (mapPitchFact.value === 0 ? qsTr("Setup required") : mapPitchFact.valueString) : ""
33
        }
34

35
        VehicleSummaryRow {
36
            labelText: qsTr("Yaw")
37
            valueText: mapYawFact ? (mapYawFact.value === 0 ? qsTr("Setup required") : mapYawFact.valueString) : ""
38
        }
39

40
        VehicleSummaryRow {
41
            labelText: qsTr("Throttle")
42
            valueText: mapThrottleFact ? (mapThrottleFact.value === 0 ? qsTr("Setup required") : mapThrottleFact.valueString) : ""
43
        }
44

45
        VehicleSummaryRow {
46
            labelText:  qsTr("Flaps")
Don Gagne's avatar
Don Gagne committed
47 48
            valueText:  mapFlapsFact ? (mapFlapsFact.value === 0 ? qsTr("Disabled") : mapFlapsFact.valueString) : ""
            visible:    !controller.vehicle.multiRotor
49
        }
50

51
        VehicleSummaryRow {
52
            labelText: qsTr("Aux1")
53
            valueText: mapAux1Fact ? (mapAux1Fact.value === 0 ? qsTr("Disabled") : mapAux1Fact.valueString) : ""
54
        }
55

56
        VehicleSummaryRow {
57
            labelText: qsTr("Aux2")
58
            valueText: mapAux2Fact ? (mapAux2Fact.value === 0 ? qsTr("Disabled") : mapAux2Fact.valueString) : ""
59
        }
60 61
    }
}