SensorsComponentSummary.qml 1.72 KB
Newer Older
1 2
import QtQuick 2.3
import QtQuick.Controls 1.2
3
import QtQuick.Controls.Styles 1.4
4

5 6 7 8 9 10 11 12
import QGroundControl.FactSystem 1.0
import QGroundControl.FactControls 1.0
import QGroundControl.Controls 1.0
import QGroundControl.Palette 1.0

/*
    IMPORTANT NOTE: Any changes made here must also be made to SensorsComponentSummary.qml
*/
13

14
Item {
15
    anchors.fill:   parent
16

17
    FactPanelController { id: controller; }
Don Gagne's avatar
Don Gagne committed
18 19

    property Fact mag0IdFact:   controller.getParameterFact(-1, "CAL_MAG0_ID")
Don Gagne's avatar
Don Gagne committed
20 21
    property Fact mag1IdFact:   controller.getParameterFact(-1, "CAL_MAG1_ID")
    property Fact mag2IdFact:   controller.getParameterFact(-1, "CAL_MAG2_ID")
Don Gagne's avatar
Don Gagne committed
22 23
    property Fact gyro0IdFact:  controller.getParameterFact(-1, "CAL_GYRO0_ID")
    property Fact accel0IdFact: controller.getParameterFact(-1, "CAL_ACC0_ID")
24

25 26
    Column {
        anchors.fill:       parent
27

28
        VehicleSummaryRow {
29
            labelText: qsTr("Compass 0")
30
            valueText: mag0IdFact ? (mag0IdFact.value === 0 ? qsTr("Setup required") : qsTr("Ready")) : ""
31
        }
32

Don Gagne's avatar
Don Gagne committed
33
        VehicleSummaryRow {
34
            labelText:  qsTr("Compass 1")
Don Gagne's avatar
Don Gagne committed
35
            visible:    mag1IdFact.value !== 0
36
            valueText:  qsTr("Ready")
Don Gagne's avatar
Don Gagne committed
37 38 39
        }

        VehicleSummaryRow {
40
            labelText:  qsTr("Compass 2")
Don Gagne's avatar
Don Gagne committed
41
            visible:    mag2IdFact.value !== 0
42
            valueText:  qsTr("Ready")
Don Gagne's avatar
Don Gagne committed
43 44
        }

45
        VehicleSummaryRow {
46
            labelText: qsTr("Gyro")
47
            valueText: gyro0IdFact ? (gyro0IdFact.value === 0 ? qsTr("Setup required") : qsTr("Ready")) : ""
48
        }
49

50
        VehicleSummaryRow {
51
            labelText: qsTr("Accelerometer")
52
            valueText: accel0IdFact ? (accel0IdFact.value === 0 ? qsTr("Setup required") : qsTr("Ready")) : ""
53
        }
54
    }
dogmaphobic's avatar
dogmaphobic committed
55
}