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.Controls 1.0
7

8 9 10 11
/*
    IMPORTANT NOTE: Any changes made here must also be made to SensorsComponentSummaryFixedWing.qml
*/

12 13 14 15
Column {
    anchors.fill: parent
    anchors.margins: 8

16 17 18 19 20 21 22 23 24 25 26 27 28
    Component {
        id: component

        Row {
            width: parent.width

            QGCLabel { id: label; text: labelText }
            QGCLabel {
                property Fact fact:     Fact { name: factName }
                horizontalAlignment:    Text.AlignRight;
                width:                  parent.width - label.contentWidth;
                text:                   fact.value  == 0 ? "Setup required" : "Ready"
            }
29 30 31
        }
    }

32 33 34
    Loader {
        property string labelText: "Compass:"
        property string factName: "CAL_MAG0_ID"
35
        width: parent.width
36
        sourceComponent: component
37 38
    }

39 40 41
    Loader {
        property string labelText: "Gyro:"
        property string factName: "CAL_GYRO0_ID"
42
        width: parent.width
43 44
        sourceComponent: component
    }
45

46 47 48 49 50
    Loader {
        property string labelText: "Accelerometer:"
        property string factName: "CAL_ACC0_ID"
        width: parent.width
        sourceComponent: component
51 52
    }
}