AirframeComponentSummary.qml 1.81 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
Item {
11
    anchors.fill:       parent
12

13
    AirframeComponentController { id: controller; }
14

Don Gagne's avatar
Don Gagne committed
15 16
    property Fact sysIdFact:        controller.getParameterFact(-1, "MAV_SYS_ID")
    property Fact sysAutoStartFact: controller.getParameterFact(-1, "SYS_AUTOSTART")
17

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

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

        VehicleSummaryRow {
36
            labelText: qsTr("Firmware Version")
37 38 39 40 41 42
            valueText: globals.activeVehicle.firmwareMajorVersion === -1 ? qsTr("Unknown") : globals.activeVehicle.firmwareMajorVersion + "." + globals.activeVehicle.firmwareMinorVersion + "." + globals.activeVehicle.firmwarePatchVersion + globals.activeVehicle.firmwareVersionTypeString
        }
        VehicleSummaryRow {
            visible: globals.activeVehicle.firmwareCustomMajorVersion !== -1
            labelText: qsTr("Custom Fw. Ver.")
            valueText: globals.activeVehicle.firmwareCustomMajorVersion + "." + globals.activeVehicle.firmwareCustomMinorVersion + "." + globals.activeVehicle.firmwareCustomPatchVersion
43
        }
44
    }
dogmaphobic's avatar
dogmaphobic committed
45
}