APMRadioComponentSummary.qml 1.51 KB
Newer Older
1 2
import QtQuick 2.2
import QtQuick.Controls 1.2
3

4
import QGroundControl.FactSystem 1.0
5
import QGroundControl.FactControls 1.0
6
import QGroundControl.Controls 1.0
Don Gagne's avatar
Don Gagne committed
7
import QGroundControl.Palette 1.0
8

9
FactPanel {
Don Gagne's avatar
Don Gagne committed
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 26 27

    Column {
        anchors.fill:       parent
        anchors.margins:    8

        VehicleSummaryRow {
            labelText: "Roll:"
Don Gagne's avatar
Don Gagne committed
28
            valueText: mapRollFact.value == 0 ? "Setup required" : "Channel " + mapRollFact.valueString
29 30 31 32
        }

        VehicleSummaryRow {
            labelText: "Pitch:"
Don Gagne's avatar
Don Gagne committed
33
            valueText: mapPitchFact.value == 0 ? "Setup required" : "Channel " + mapPitchFact.valueString
34 35 36 37
        }

        VehicleSummaryRow {
            labelText: "Yaw:"
Don Gagne's avatar
Don Gagne committed
38
            valueText: mapYawFact.value == 0 ? "Setup required" : "Channel " + mapYawFact.valueString
39 40 41 42
        }

        VehicleSummaryRow {
            labelText: "Throttle:"
Don Gagne's avatar
Don Gagne committed
43
            valueText: mapThrottleFact.value == 0 ? "Setup required" : "Channel " + mapThrottleFact.valueString
44
        }
45 46
    }
}