SensorsComponentSummary.qml 1.3 KB
Newer Older
1 2 3
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.2
4

5
import QGroundControl.FactSystem 1.0
6
import QGroundControl.FactControls 1.0
7
import QGroundControl.Controls 1.0
Don Gagne's avatar
Don Gagne committed
8
import QGroundControl.Palette 1.0
9

10
/*
Don Gagne's avatar
Don Gagne committed
11
    IMPORTANT NOTE: Any changes made here must also be made to SensorsComponentSummary.qml
12 13
*/

14
FactPanel {
Don Gagne's avatar
Don Gagne committed
15 16 17
    id:             panel
    anchors.fill:   parent
    color:          qgcPal.windowShadeDark
18

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

    property Fact mag0IdFact:   controller.getParameterFact(-1, "CAL_MAG0_ID")
    property Fact gyro0IdFact:  controller.getParameterFact(-1, "CAL_GYRO0_ID")
    property Fact accel0IdFact: controller.getParameterFact(-1, "CAL_ACC0_ID")
25

26 27 28
    Column {
        anchors.fill:       parent
        anchors.margins:    8
29

30 31 32 33 34 35 36 37 38
        VehicleSummaryRow {
            labelText: "Compass:"
            valueText: mag0IdFact.value  == 0 ? "Setup required" : "Ready"
        }

        VehicleSummaryRow {
            labelText: "Gyro:"
            valueText: gyro0IdFact.value  == 0 ? "Setup required" : "Ready"
        }
39

40 41 42 43
        VehicleSummaryRow {
            labelText: "Accelerometer:"
            valueText: accel0IdFact.value  == 0 ? "Setup required" : "Ready"
        }
44
    }
45
}