SensorsComponentSummary.qml 1.2 KB
Newer Older
Don Gagne's avatar
Don Gagne committed
1
import QtQuick          2.5
2
import QtQuick.Controls 1.2
3

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

10
FactPanel {
Don Gagne's avatar
Don Gagne committed
11 12 13 14
    id:     panel
    width:  grid.width
    height: grid.height
    color:  qgcPal.windowShade
15

Don Gagne's avatar
Don Gagne committed
16 17 18 19 20 21
    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")
22

Don Gagne's avatar
Don Gagne committed
23 24 25 26 27
    Grid {
        id:         grid
        rows:       3
        columns:    2
        spacing:    ScreenTools.defaultFontPixelWidth / 2
28

Don Gagne's avatar
Don Gagne committed
29 30
        QGCLabel { text: "Compass:" }
        QGCLabel { text: mag0IdFact.value  == 0 ? "Setup required" : "Ready" }
31

Don Gagne's avatar
Don Gagne committed
32 33
        QGCLabel { text: "Gyro:" }
        QGCLabel { text: gyro0IdFact.value  == 0 ? "Setup required" : "Ready" }
34

Don Gagne's avatar
Don Gagne committed
35 36
        QGCLabel { text: "Accelerometer:" }
        QGCLabel { text: accel0IdFact.value  == 0 ? "Setup required" : "Ready" }
37
    }
Don Gagne's avatar
Don Gagne committed
38
}