APMAirframeComponentSummary.qml 1.38 KB
Newer Older
1
import QtQuick 2.2
2 3
import QtQuick.Controls 1.2

4 5 6 7 8
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
9 10

FactPanel {
11 12 13
    id:             panel
    anchors.fill:   parent
    color:          qgcPal.windowShadeDark
14 15

    QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
16 17 18 19
    APMAirframeComponentController {
        id:         controller
        factPanel:  panel
    }
20

21
    property Fact sysIdFact:        controller.getParameterFact(-1, "FRAME")
22

23
    Column {
24
        anchors.fill:       parent
25 26
        VehicleSummaryRow {
            id: nameRow;
27
            labelText: qsTr("Frame Type:")
28
            valueText: controller.currentAirframeTypeName() + " " + (sysIdFact.valueString === "0" ? "Plus"
29 30 31
                     : sysIdFact.valueString === "1" ? "X"
                     : sysIdFact.valueString === "2" ? "V"
                     : sysIdFact.valueString == "3" ? "H"
32
                     : /* Fact.value == 10 */  "New Y6");
33 34

        }
35 36 37 38 39

        VehicleSummaryRow {
            labelText: qsTr("Firmware Version:")
            valueText: activeVehicle.firmwareMajorVersion == -1 ? qsTr("Unknown") : activeVehicle.firmwareMajorVersion + "." + activeVehicle.firmwareMinorVersion + "." + activeVehicle.firmwarePatchVersion + activeVehicle.firmwareVersionTypeString
        }
40 41
    }
}