APMSensorsComponentSummary.qml 1.78 KB
Newer Older
1 2 3
import QtQuick                  2.5
import QtQuick.Controls         1.2
import QtQuick.Controls.Styles  1.2
Don Gagne's avatar
Don Gagne committed
4

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

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

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

    QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
Don Gagne's avatar
Don Gagne committed
22

23
    APMSensorsComponentController { id: controller; factPanel: panel }
Don Gagne's avatar
Don Gagne committed
24

25 26 27 28
    APMSensorParams {
        id:                     sensorParams
        factPanelController:    controller
    }
Don Gagne's avatar
Don Gagne committed
29

30 31
    Column {
        anchors.fill:       parent
Don Gagne's avatar
Don Gagne committed
32

33 34 35 36 37 38 39 40 41 42 43 44 45 46
        Repeater {
            model: 3

            VehicleSummaryRow {
                labelText:  qsTr("Compass ") + (index + 1) + ":"
                valueText:  sensorParams.rgCompassAvailable[index] ?
                                (sensorParams.rgCompassCalibrated[index] ?
                                     (sensorParams.rgCompassPrimary[index] ? "Primary" : "Secondary") +
                                     (sensorParams.rgCompassExternalParamAvailable[index] ?
                                          (sensorParams.rgCompassExternal[index] ? ", External" : ", Internal" ) :
                                          "") :
                                     qsTr("Setup required")) :
                                qsTr("Not installed")
            }
47
        }
Don Gagne's avatar
Don Gagne committed
48

49
        VehicleSummaryRow {
50
            labelText: qsTr("Accelerometer(s):")
51
            valueText: controller.accelSetupNeeded ? qsTr("Setup required") : qsTr("Ready")
52
        }
Don Gagne's avatar
Don Gagne committed
53 54
    }
}