APMCameraComponentSummary.qml 1.57 KB
Newer Older
1 2
import QtQuick          2.3
import QtQuick.Controls 1.2
Don Gagne's avatar
Don Gagne committed
3

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

FactPanel {
10 11 12
    id:             panel
    anchors.fill:   parent
    color:          qgcPal.windowShadeDark
Don Gagne's avatar
Don Gagne committed
13 14 15 16 17 18 19

    QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
    FactPanelController { id: controller; factPanel: panel }

    property Fact _mountRCInTilt:   controller.getParameterFact(-1, "MNT_RC_IN_TILT")
    property Fact _mountRCInRoll:   controller.getParameterFact(-1, "MNT_RC_IN_ROLL")
    property Fact _mountRCInPan:    controller.getParameterFact(-1, "MNT_RC_IN_PAN")
20 21 22 23

    // MNT_TYPE parameter is not in older firmware versions
    property bool   _mountTypeExists: controller.parameterExists(-1, "MNT_TYPE")
    property string _mountTypeValue: _mountTypeExists ? controller.getParameterFact(-1, "MNT_TYPE").enumStringValue : ""
Don Gagne's avatar
Don Gagne committed
24

25 26 27 28
    Column {
        anchors.fill:       parent

        VehicleSummaryRow {
29
            visible:    _mountTypeExists
30
            labelText:  qsTr("Gimbal type:")
31
            valueText:  _mountTypeValue
32 33 34
        }

        VehicleSummaryRow {
35
            labelText:  qsTr("Tilt input channel:")
36 37 38 39
            valueText:  _mountRCInTilt.enumStringValue
        }

        VehicleSummaryRow {
40
            labelText:  qsTr("Pan input channel:")
41 42 43 44
            valueText:  _mountRCInPan.enumStringValue
        }

        VehicleSummaryRow {
45
            labelText:  qsTr("Roll input channel:")
46 47
            valueText:  _mountRCInRoll.enumStringValue
        }
Don Gagne's avatar
Don Gagne committed
48 49
    }
}