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 width: parent.width
29 spacing: 0
30
31 VehicleSummaryRow {
32 labelText: qsTr("Compass 0")
33 valueText: mag0IdFact ? (mag0IdFact.value === 0 ? qsTr("Setup required") : qsTr("Ready")) : ""
34 }
35
36 VehicleSummaryRow {
37 labelText: qsTr("Compass 1")
38 visible: mag1IdFact.value !== 0
39 valueText: qsTr("Ready")
40 }
41
42 VehicleSummaryRow {
43 labelText: qsTr("Compass 2")
44 visible: mag2IdFact.value !== 0
45 valueText: qsTr("Ready")
46 }
47
48 VehicleSummaryRow {
49 labelText: qsTr("Gyro")
50 valueText: gyro0IdFact ? (gyro0IdFact.value === 0 ? qsTr("Setup required") : qsTr("Ready")) : ""
51 }
52
53 VehicleSummaryRow {
54 labelText: qsTr("Accelerometer")
55 valueText: accel0IdFact ? (accel0IdFact.value === 0 ? qsTr("Setup required") : qsTr("Ready")) : ""
56 }
57 }
58}