APMSafetyComponentSummarySub.qml 2.17 KB
Newer Older
1 2
import QtQuick 2.3
import QtQuick.Controls 1.2
3 4 5 6 7 8 9 10 11 12 13 14 15 16

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

FactPanel {
    id:             panel
    anchors.fill:   parent
    color:          qgcPal.windowShadeDark

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

17 18
    property Fact _failsafeGCSEnable:   controller.getParameterFact(-1, "FS_GCS_ENABLE")
    property Fact _failsafeLeakEnable:  controller.getParameterFact(-1, "FS_LEAK_ENABLE")
19 20 21 22 23

    property Fact _fenceAction: controller.getParameterFact(-1, "FENCE_ACTION")
    property Fact _fenceEnable: controller.getParameterFact(-1, "FENCE_ENABLE")
    property Fact _fenceType:   controller.getParameterFact(-1, "FENCE_TYPE")

24
    property Fact _leakPin:     controller.getParameterFact(-1, "LEAK1_PIN")
25 26 27 28 29 30 31 32 33 34 35 36

    property Fact _armingCheck: controller.getParameterFact(-1, "ARMING_CHECK")

    Column {
        anchors.fill:       parent

        VehicleSummaryRow {
            labelText: qsTr("Arming Checks:")
            valueText:  _armingCheck.value & 1 ? qsTr("Enabled") : qsTr("Some disabled")
        }

        VehicleSummaryRow {
37
            labelText: qsTr("GCS failsafe:")
38
            valueText: _failsafeGCSEnable.enumOrValueString
39 40 41
        }

        VehicleSummaryRow {
42
            labelText: qsTr("Leak failsafe:")
43
            valueText:  _failsafeLeakEnable.enumOrValueString
44 45 46
        }

        VehicleSummaryRow {
47
            labelText: qsTr("Leak detector:")
48
            valueText: _leakPin.enumOrValueString
49 50 51 52 53 54 55
        }

        VehicleSummaryRow {
            labelText: qsTr("GeoFence:")
            valueText: _fenceEnable.value == 0 || _fenceType == 0 ?
                           qsTr("Disabled") :
                           (_fenceType.value == 1 ?
56 57
                                qsTr("Depth") :
                                (_fenceType.value == 2 ? qsTr("Circle") : qsTr("Depth,Circle")))
58 59 60 61
        }

        VehicleSummaryRow {
            labelText: qsTr("GeoFence:")
62
            valueText: qsTr("Report only")
63 64 65 66
            visible:    _fenceEnable.value != 0
        }
    }
}