QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
SensorsComponentSummary.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
9/*
10 IMPORTANT NOTE: Any changes made here must also be made to SensorsComponentSummary.qml
11*/
12
13Item {
14 implicitWidth: mainLayout.implicitWidth
15 implicitHeight: mainLayout.implicitHeight
16 width: parent.width // grows when Loader is wider than implicitWidth
17
18 FactPanelController { id: controller; }
19
20 property Fact mag0IdFact: controller.getParameterFact(-1, "CAL_MAG0_ID")
21 property Fact mag1IdFact: controller.getParameterFact(-1, "CAL_MAG1_ID")
22 property Fact mag2IdFact: controller.getParameterFact(-1, "CAL_MAG2_ID")
23 property Fact gyro0IdFact: controller.getParameterFact(-1, "CAL_GYRO0_ID")
24 property Fact accel0IdFact: controller.getParameterFact(-1, "CAL_ACC0_ID")
25
26 ColumnLayout {
27 id: mainLayout
28 spacing: 0
29
30 VehicleSummaryRow {
31 labelText: qsTr("Compass 0")
32 valueText: mag0IdFact ? (mag0IdFact.value === 0 ? qsTr("Setup required") : qsTr("Ready")) : ""
33 }
34
35 VehicleSummaryRow {
36 labelText: qsTr("Compass 1")
37 visible: mag1IdFact.value !== 0
38 valueText: qsTr("Ready")
39 }
40
41 VehicleSummaryRow {
42 labelText: qsTr("Compass 2")
43 visible: mag2IdFact.value !== 0
44 valueText: qsTr("Ready")
45 }
46
47 VehicleSummaryRow {
48 labelText: qsTr("Gyro")
49 valueText: gyro0IdFact ? (gyro0IdFact.value === 0 ? qsTr("Setup required") : qsTr("Ready")) : ""
50 }
51
52 VehicleSummaryRow {
53 labelText: qsTr("Accelerometer")
54 valueText: accel0IdFact ? (accel0IdFact.value === 0 ? qsTr("Setup required") : qsTr("Ready")) : ""
55 }
56 }
57}