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
3import QtQuick.Layouts
4
5import QGroundControl
6import QGroundControl.FactControls
7import QGroundControl.Controls
8
9Item {
10 implicitWidth: mainLayout.implicitWidth
11 implicitHeight: mainLayout.implicitHeight
12 width: parent.width // grows when Loader is wider than implicitWidth
13
14 AirframeComponentController { id: controller; }
15
16 property Fact sysIdFact: controller.getParameterFact(-1, "MAV_SYS_ID")
17 property Fact sysAutoStartFact: controller.getParameterFact(-1, "SYS_AUTOSTART")
18
19 property bool autoStartSet: sysAutoStartFact ? (sysAutoStartFact.value !== 0) : false
20
21 ColumnLayout {
22 id: mainLayout
23 spacing: 0
24
25 VehicleSummaryRow {
26 labelText: qsTr("System ID")
27 valueText: sysIdFact ? sysIdFact.valueString : ""
28 }
29 VehicleSummaryRow {
30 labelText: qsTr("Airframe type")
31 valueText: autoStartSet ? controller.currentAirframeType : qsTr("Setup required")
32 }
33 VehicleSummaryRow {
34 labelText: qsTr("Vehicle")
35 valueText: autoStartSet ? controller.currentVehicleName : qsTr("Setup required")
36 }
37
38 VehicleSummaryRow {
39 labelText: qsTr("Firmware Version")
40 valueText: globals.activeVehicle.firmwareMajorVersion === -1 ? qsTr("Unknown") : globals.activeVehicle.firmwareMajorVersion + "." + globals.activeVehicle.firmwareMinorVersion + "." + globals.activeVehicle.firmwarePatchVersion + globals.activeVehicle.firmwareVersionTypeString
41 }
42 VehicleSummaryRow {
43 visible: globals.activeVehicle.firmwareCustomMajorVersion !== -1
44 labelText: qsTr("Custom Fw. Ver.")
45 valueText: globals.activeVehicle.firmwareCustomMajorVersion + "." + globals.activeVehicle.firmwareCustomMinorVersion + "." + globals.activeVehicle.firmwareCustomPatchVersion
46 }
47 }
48}