FlightModesComponentSummary.qml 1.64 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 9 10 11 12 13 14

Column {
    anchors.fill: parent
    anchors.margins: 8

    Row {
        width: parent.width

15 16
        QGCLabel { id: mode; text: "Mode switch:" }
        QGCLabel {
17 18 19 20 21 22 23 24 25
            horizontalAlignment: Text.AlignRight
            width: parent.width - mode.contentWidth
            text: autopilot.parameters["RC_MAP_MODE_SW"].value == 0 ? "Setup required" : autopilot.parameters["RC_MAP_MODE_SW"].value
        }
    }

    Row {
        width: parent.width

26 27
        QGCLabel { id: posctl; text: "Position Ctl switch:" }
        QGCLabel {
28 29 30 31 32 33 34 35 36
            horizontalAlignment: Text.AlignRight
            width: parent.width - posctl.contentWidth
            text: autopilot.parameters["RC_MAP_POSCTL_SW"].value == 0 ? "Not mapped" : autopilot.parameters["RC_MAP_POSCTL_SW"].value
        }
    }

    Row {
        width: parent.width

37 38
        QGCLabel { id: loiter; text: "Loiter switch:" }
        QGCLabel {
39 40 41 42 43 44 45 46 47
            horizontalAlignment: Text.AlignRight
            width: parent.width - loiter.contentWidth
            text: autopilot.parameters["RC_MAP_LOITER_SW"].value == 0 ? "Not mapped" : autopilot.parameters["RC_MAP_LOITER_SW"].value
        }
    }

    Row {
        width: parent.width

48 49
        QGCLabel { id: rtl; text: "Return switch:" }
        QGCLabel {
50 51 52 53 54 55
            horizontalAlignment: Text.AlignRight
            width: parent.width - rtl.contentWidth
            text: autopilot.parameters["RC_MAP_RETURN_SW"].value == 0 ? "Not mapped" : autopilot.parameters["RC_MAP_RETURN_SW"].value
        }
    }
}