RadioComponentSummary.qml 2.1 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
7

8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
FactPanel {
    anchors.fill: parent

    Fact { id: mapRollFact;     name: "RC_MAP_ROLL";        onFactMissing: showMissingFactOverlay(name) }
    Fact { id: mapPitchFact;    name: "RC_MAP_PITCH";       onFactMissing: showMissingFactOverlay(name) }
    Fact { id: mapYawFact;      name: "RC_MAP_YAW";         onFactMissing: showMissingFactOverlay(name) }
    Fact { id: mapThrottleFact; name: "RC_MAP_THROTTLE";    onFactMissing: showMissingFactOverlay(name) }
    Fact { id: mapFlapsFact;    name: "RC_MAP_FLAPS";       onFactMissing: showMissingFactOverlay(name) }
    Fact { id: mapAux1Fact;     name: "RC_MAP_AUX1";        onFactMissing: showMissingFactOverlay(name) }
    Fact { id: mapAux2Fact;     name: "RC_MAP_AUX2";        onFactMissing: showMissingFactOverlay(name) }

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

        VehicleSummaryRow {
            labelText: "Roll:"
            valueText: mapRollFact.value == 0 ? "Setup required" : mapRollFact.valueString
        }

        VehicleSummaryRow {
            labelText: "Pitch:"
            valueText: mapPitchFact.value == 0 ? "Setup required" : mapPitchFact.valueString
        }

        VehicleSummaryRow {
            labelText: "Yaw:"
            valueText: mapYawFact.value == 0 ? "Setup required" : mapYawFact.valueString
        }

        VehicleSummaryRow {
            labelText: "Throttle:"
            valueText: mapThrottleFact.value == 0 ? "Setup required" : mapThrottleFact.valueString
        }

        VehicleSummaryRow {
            labelText: "Flaps:"
            valueText: mapFlapsFact.value == 0 ? "Disabled" : mapFlapsFact.valueString
        }

        VehicleSummaryRow {
            labelText: "Aux1:"
            valueText: mapAux1Fact.value == 0 ? "Disabled" : mapAux1Fact.valueString
        }

        VehicleSummaryRow {
            labelText: "Aux2:"
            valueText: mapAux2Fact.value == 0 ? "Disabled" : mapAux2Fact.valueString
        }
57 58
    }
}