APMRadioComponentSummary.qml 1.42 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

Don Gagne's avatar
Don Gagne committed
14 15 16 17
    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")
18

19 20 21 22
    Column {
        anchors.fill:       parent

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

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

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

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