APMCameraComponentSummary.qml 1.48 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
Item {
10 11
    anchors.fill:   parent
    color:          qgcPal.windowShadeDark
Don Gagne's avatar
Don Gagne committed
12

13
    FactPanelController { id: controller; }
Don Gagne's avatar
Don Gagne committed
14 15 16 17

    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")
18 19 20 21

    // 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
22

23 24 25 26
    Column {
        anchors.fill:       parent

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

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

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

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