QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
AirframeComponentSummary.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Controls
3
4import QGroundControl
5import QGroundControl.FactControls
6import QGroundControl.Controls
7
8Item {
9 anchors.fill: parent
10
11 AirframeComponentController { id: controller; }
12
13 property Fact sysIdFact: controller.getParameterFact(-1, "MAV_SYS_ID")
14 property Fact sysAutoStartFact: controller.getParameterFact(-1, "SYS_AUTOSTART")
15
16 property bool autoStartSet: sysAutoStartFact ? (sysAutoStartFact.value !== 0) : false
17
18 Column {
19 anchors.fill: parent
20 VehicleSummaryRow {
21 labelText: qsTr("System ID")
22 valueText: sysIdFact ? sysIdFact.valueString : ""
23 }
24 VehicleSummaryRow {
25 labelText: qsTr("Airframe type")
26 valueText: autoStartSet ? controller.currentAirframeType : qsTr("Setup required")
27 }
28 VehicleSummaryRow {
29 labelText: qsTr("Vehicle")
30 valueText: autoStartSet ? controller.currentVehicleName : qsTr("Setup required")
31 }
32
33 VehicleSummaryRow {
34 labelText: qsTr("Firmware Version")
35 valueText: globals.activeVehicle.firmwareMajorVersion === -1 ? qsTr("Unknown") : globals.activeVehicle.firmwareMajorVersion + "." + globals.activeVehicle.firmwareMinorVersion + "." + globals.activeVehicle.firmwarePatchVersion + globals.activeVehicle.firmwareVersionTypeString
36 }
37 VehicleSummaryRow {
38 visible: globals.activeVehicle.firmwareCustomMajorVersion !== -1
39 labelText: qsTr("Custom Fw. Ver.")
40 valueText: globals.activeVehicle.firmwareCustomMajorVersion + "." + globals.activeVehicle.firmwareCustomMinorVersion + "." + globals.activeVehicle.firmwareCustomPatchVersion
41 }
42 }
43}