APMRadioComponentSummary.qml 1.57 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
FactPanel {
10 11 12
    id:             panel
    anchors.fill:   parent
    color:          qgcPal.windowShadeDark
13

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

Don Gagne's avatar
Don Gagne committed
17 18 19 20
    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")
21

22 23 24 25
    Column {
        anchors.fill:       parent

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

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

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

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