SensorsComponentSummary.qml 1.9 KB
Newer Older
1
import QtQuick 2.2
2
import QtQuick.Controls 1.2
3
import QtQuick.Controls.Styles 1.2
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
FactPanel {
15 16 17
    id:             panel
    anchors.fill:   parent
    color:          qgcPal.windowShadeDark
18

Don Gagne's avatar
Don Gagne committed
19 20 21 22
    QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
    FactPanelController { id: controller; factPanel: panel }

    property Fact mag0IdFact:   controller.getParameterFact(-1, "CAL_MAG0_ID")
Don Gagne's avatar
Don Gagne committed
23 24
    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
25 26
    property Fact gyro0IdFact:  controller.getParameterFact(-1, "CAL_GYRO0_ID")
    property Fact accel0IdFact: controller.getParameterFact(-1, "CAL_ACC0_ID")
27

28 29 30
    Column {
        anchors.fill:       parent
        anchors.margins:    8
31

32
        VehicleSummaryRow {
33
            labelText: qsTr("Compass 0:")
34
            valueText: mag0IdFact ? (mag0IdFact.value === 0 ? qsTr("Setup required") : qsTr("Ready")) : ""
35
        }
36

Don Gagne's avatar
Don Gagne committed
37
        VehicleSummaryRow {
38
            labelText:  qsTr("Compass 1:")
Don Gagne's avatar
Don Gagne committed
39
            visible:    mag1IdFact.value !== 0
40
            valueText:  qsTr("Ready")
Don Gagne's avatar
Don Gagne committed
41 42 43
        }

        VehicleSummaryRow {
44
            labelText:  qsTr("Compass 2:")
Don Gagne's avatar
Don Gagne committed
45
            visible:    mag2IdFact.value !== 0
46
            valueText:  qsTr("Ready")
Don Gagne's avatar
Don Gagne committed
47 48
        }

49
        VehicleSummaryRow {
50 51
            labelText: qsTr("Gyro:")
            valueText: gyro0IdFact ? (gyro0IdFact.value === 0 ? qsTr("Setup required") : qsTr("Ready")) : ""
52
        }
53

54
        VehicleSummaryRow {
55 56
            labelText: qsTr("Accelerometer:")
            valueText: accel0IdFact ? (accel0IdFact.value === 0 ? qsTr("Setup required") : qsTr("Ready")) : ""
57
        }
58
    }
dogmaphobic's avatar
dogmaphobic committed
59
}