FlightModesComponentSummary.qml 1.35 KB
Newer Older
1 2
import QtQuick 2.2
import QtQuick.Controls 1.2
3

4
import QGroundControl.FactSystem 1.0
5
import QGroundControl.FactControls 1.0
6
import QGroundControl.Controls 1.0
7

8 9
FactPanel {
    anchors.fill: parent
10

11 12 13 14
    Fact { id: modeSwFact;      name: "RC_MAP_MODE_SW";     onFactMissing: showMissingFactOverlay(name) }
    Fact { id: posCtlSwFact;    name: "RC_MAP_POSCTL_SW";   onFactMissing: showMissingFactOverlay(name) }
    Fact { id: loiterSwFact;    name: "RC_MAP_LOITER_SW";   onFactMissing: showMissingFactOverlay(name) }
    Fact { id: returnSwFact;    name: "RC_MAP_RETURN_SW";   onFactMissing: showMissingFactOverlay(name) }
15

16 17 18
    Column {
        anchors.fill:       parent
        anchors.margins:    8
19

20 21 22 23
        VehicleSummaryRow {
            labelText: "Mode switch:"
            valueText: modeSwFact.value == 0 ? "Setup required" : modeSwFact.valueString
        }
24

25 26 27 28 29 30 31 32 33
        VehicleSummaryRow {
            labelText: "Position Ctl switch:"
            valueText: posCtlSwFact.value == 0 ? "Disabled" : posCtlSwFact.valueString
        }

        VehicleSummaryRow {
            labelText: "Loiter switch:"
            valueText: loiterSwFact.value == 0 ? "Disabled" : loiterSwFact.valueString
        }
34

35 36 37 38
        VehicleSummaryRow {
            labelText: "Return switch:"
            valueText: returnSwFact.value == 0 ? "Disabled" : returnSwFact.valueString
        }
39 40
    }
}