AirframeComponentSummary.qml 1.58 KB
Newer Older
1 2
import QtQuick 2.3
import QtQuick.Controls 1.2
3

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

Don Gagne's avatar
Don Gagne committed
15
    QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
16
    AirframeComponentController { id: controller; factPanel: panel }
17

Don Gagne's avatar
Don Gagne committed
18 19
    property Fact sysIdFact:        controller.getParameterFact(-1, "MAV_SYS_ID")
    property Fact sysAutoStartFact: controller.getParameterFact(-1, "SYS_AUTOSTART")
20

dogmaphobic's avatar
dogmaphobic committed
21
    property bool autoStartSet: sysAutoStartFact ? (sysAutoStartFact.value !== 0) : false
22

23
    Column {
24
        anchors.fill:       parent
25
        VehicleSummaryRow {
26
            labelText: qsTr("System ID:")
dogmaphobic's avatar
dogmaphobic committed
27
            valueText: sysIdFact ? sysIdFact.valueString : ""
28 29
        }
        VehicleSummaryRow {
30 31
            labelText: qsTr("Airframe type:")
            valueText: autoStartSet ? controller.currentAirframeType : qsTr("Setup required")
32 33
        }
        VehicleSummaryRow {
34 35
            labelText: qsTr("Vehicle:")
            valueText: autoStartSet ? controller.currentVehicleName : qsTr("Setup required")
36
        }
37 38 39

        VehicleSummaryRow {
            labelText: qsTr("Firmware Version:")
40
            valueText: activeVehicle.firmwareMajorVersion === -1 ? qsTr("Unknown") : activeVehicle.firmwareMajorVersion + "." + activeVehicle.firmwareMinorVersion + "." + activeVehicle.firmwarePatchVersion + activeVehicle.firmwareVersionTypeString
41
        }
42
    }
dogmaphobic's avatar
dogmaphobic committed
43
}