APMSensorsComponentSummary.qml 1.67 KB
Newer Older
1 2
import QtQuick                  2.3
import QtQuick.Controls         1.2
3
import QtQuick.Controls.Styles  1.4
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
*/

16
Item {
17 18
    anchors.fill:   parent
    color:          qgcPal.windowShadeDark
Don Gagne's avatar
Don Gagne committed
19

20
    APMSensorsComponentController { id: controller; }
Don Gagne's avatar
Don Gagne committed
21

22 23 24 25
    APMSensorParams {
        id:                     sensorParams
        factPanelController:    controller
    }
Don Gagne's avatar
Don Gagne committed
26

27 28
    Column {
        anchors.fill:       parent
Don Gagne's avatar
Don Gagne committed
29

30 31 32 33
        Repeater {
            model: 3

            VehicleSummaryRow {
34
                labelText:  qsTr("Compass ") + (index + 1) + ""
35 36 37 38 39 40 41 42 43
                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")
            }
44
        }
Don Gagne's avatar
Don Gagne committed
45

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