APMCameraComponentSummary.qml 1.44 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
    anchors.fill:   parent
Don Gagne's avatar
Don Gagne committed
11

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

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

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

22 23 24 25
    Column {
        anchors.fill:       parent

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

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

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

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