CameraComponentSummary.qml 2.12 KB
Newer Older
1 2
import QtQuick 2.3
import QtQuick.Controls 1.2
3 4 5 6 7 8

import QGroundControl.FactSystem 1.0
import QGroundControl.FactControls 1.0
import QGroundControl.Controls 1.0
import QGroundControl.Palette 1.0

9
Item {
10 11
    anchors.fill:   parent

12
    FactPanelController { id: controller; }
13

Lorenz Meier's avatar
Lorenz Meier committed
14
    property Fact _camTriggerMode:  controller.getParameterFact(-1, "TRIG_MODE", false)
15
    property Fact _camTriggerInterface:  controller.getParameterFact(-1, "TRIG_INTERFACE", false)
dogmaphobic's avatar
dogmaphobic committed
16 17 18 19
    property Fact _camTriggerPol:   controller.getParameterFact(-1, "TRIG_POLARITY", false) // Don't bitch about missing as these only exist if trigger mode is enabled
    property Fact _auxPins:         controller.getParameterFact(-1, "TRIG_PINS",     false) // Ditto
    property Fact _timeInterval:    controller.getParameterFact(-1, "TRIG_INTERVAL", false) // Ditto
    property Fact _distanceInterval:controller.getParameterFact(-1, "TRIG_DISTANCE", false) // Ditto
20 21 22 23

    Column {
        anchors.fill:       parent

24
        VehicleSummaryRow {
25
            labelText: qsTr("Trigger interface")
26 27 28
            valueText: _camTriggerInterface ? _camTriggerInterface.enumStringValue : ""
        }

29
        VehicleSummaryRow {
30
            labelText: qsTr("Trigger mode")
31 32 33
            valueText: _camTriggerMode ? _camTriggerMode.enumStringValue : ""
        }

dogmaphobic's avatar
dogmaphobic committed
34 35
        VehicleSummaryRow {
            visible:    _timeInterval && _camTriggerMode.value === 2
36
            labelText:  qsTr("Time interval")
dogmaphobic's avatar
dogmaphobic committed
37 38 39 40 41
            valueText:  _timeInterval ? _timeInterval.value : ""
        }

        VehicleSummaryRow {
            visible:    _distanceInterval && _camTriggerMode.value === 3
42
            labelText:  qsTr("Distance interval")
dogmaphobic's avatar
dogmaphobic committed
43 44 45 46 47
            valueText:  _distanceInterval ? _distanceInterval.value : ""
        }

        VehicleSummaryRow {
            visible:    _auxPins
48
            labelText:  qsTr("AUX pins")
dogmaphobic's avatar
dogmaphobic committed
49 50 51 52 53
            valueText:  _auxPins ? _auxPins.value : ""
        }

        VehicleSummaryRow {
            visible:    _camTriggerPol
54
            labelText:  qsTr("AUX pin polarity")
dogmaphobic's avatar
dogmaphobic committed
55 56 57
            valueText:  _camTriggerPol ? (_camTriggerPol.value ? "High (3.3V)" : "Low (0V)") : ""
        }

58 59
    }
}