APMSensorsComponentSummary.qml 1.63 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
    anchors.fill:   parent
Don Gagne's avatar
Don Gagne committed
18

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

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

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

29 30 31 32
        Repeater {
            model: 3

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

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