APMRadioComponentSummary.qml 1.56 KB
Newer Older
Don Gagne's avatar
Don Gagne committed
1
import QtQuick          2.5
2
import QtQuick.Controls 1.2
3

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

11
FactPanel {
Don Gagne's avatar
Don Gagne committed
12 13 14 15
    id:     panel
    width:  grid.width
    height: grid.height
    color:  qgcPal.windowShade
16

Don Gagne's avatar
Don Gagne committed
17 18 19
    QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
    FactPanelController { id: controller; factPanel: panel }

Don Gagne's avatar
Don Gagne committed
20 21 22 23
    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")
24

Don Gagne's avatar
Don Gagne committed
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
    Grid {
        id:         grid
        rows:       4
        columns:    2
        spacing:    ScreenTools.defaultFontPixelWidth / 2

        QGCLabel { text: "Roll:" }
        QGCLabel { text: mapRollFact.value == 0 ? "Setup required" : "Channel " + mapRollFact.valueString }

        QGCLabel { text: "Pitch:" }
        QGCLabel { text: mapPitchFact.value == 0 ? "Setup required" : "Channel " + mapPitchFact.valueString }

        QGCLabel { text: "Yaw:" }
        QGCLabel { text: mapYawFact.value == 0 ? "Setup required" : "Channel " + mapYawFact.valueString }

        QGCLabel { text: "Throttle:" }
        QGCLabel { text: mapThrottleFact.value == 0 ? "Setup required" : "Channel " + mapThrottleFact.valueString }
42 43
    }
}