FlightModesComponentSummary.qml 1.04 KB
Newer Older
1 2 3
import QtQuick 2.2
import QtQuick.Controls 1.2
import QtQuick.Controls.Styles 1.2
4

5
import QGroundControl.FactSystem 1.0
6
import QGroundControl.Controls 1.0
7 8

Column {
9 10 11 12
    Fact { id: modeSwFact;      name: "RC_MAP_MODE_SW" }
    Fact { id: posCtlSwFact;    name: "RC_MAP_POSCTL_SW" }
    Fact { id: loiterSwFact;    name: "RC_MAP_LOITER_SW" }
    Fact { id: returnSwFact;    name: "RC_MAP_RETURN_SW" }
13

14 15
    anchors.fill:       parent
    anchors.margins:    8
16

17 18 19
    VehicleSummaryRow {
        labelText: "Mode switch:"
        valueText: modeSwFact.value == 0 ? "Setup required" : modeSwFact.valueString
20 21
    }

22 23
    VehicleSummaryRow {
        labelText: "Position Ctl switch:"
Don Gagne's avatar
Don Gagne committed
24
        valueText: posCtlSwFact.value == 0 ? "Disabled" : posCtlSwFact.valueString
25 26
    }

27
    VehicleSummaryRow {
Don Gagne's avatar
Don Gagne committed
28 29
        labelText: "Loiter switch:"
        valueText: loiterSwFact.value == 0 ? "Disabled" : loiterSwFact.valueString
30
    }
31

32 33
    VehicleSummaryRow {
        labelText: "Return switch:"
Don Gagne's avatar
Don Gagne committed
34
        valueText: returnSwFact.value == 0 ? "Disabled" : returnSwFact.valueString
35 36
    }
}