APMRadioComponentSummary.qml 1.52 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 11
    anchors.fill:   parent
    color:          qgcPal.windowShadeDark
12

Don Gagne's avatar
Don Gagne committed
13
    QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
14
    FactPanelController { id: controller; }
Don Gagne's avatar
Don Gagne committed
15

Don Gagne's avatar
Don Gagne committed
16 17 18 19
    property Fact mapRollFact:      controller.getParameterFact(-1, "RCMAP_ROLL")
    property Fact mapPitchFact:     controller.getParameterFact(-1, "RCMAP_PITCH")
    property Fact mapYawFact:       controller.getParameterFact(-1, "RCMAP_YAW")
    property Fact mapThrottleFact:  controller.getParameterFact(-1, "RCMAP_THROTTLE")
20

21 22 23 24
    Column {
        anchors.fill:       parent

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

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

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

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