APMFlightModesComponentSummary.qml 1.94 KB
Newer Older
1 2
import QtQuick          2.3
import QtQuick.Controls 1.2
Don Gagne's avatar
Don Gagne committed
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
    anchors.fill:   parent
Don Gagne's avatar
Don Gagne committed
11

12
    FactPanelController { id: controller; }
Don Gagne's avatar
Don Gagne committed
13

14 15 16 17 18 19 20 21 22
    property var    _vehicle:       controller.vehicle
    property bool   _roverFirmware: controller.parameterExists(-1, "MODE1") // This catches all usage of ArduRover firmware vehicle types: Rover, Boat...

    property Fact flightMode1: controller.getParameterFact(-1, _roverFirmware ? "MODE1" : "FLTMODE1")
    property Fact flightMode2: controller.getParameterFact(-1, _roverFirmware ? "MODE2" : "FLTMODE2")
    property Fact flightMode3: controller.getParameterFact(-1, _roverFirmware ? "MODE3" : "FLTMODE3")
    property Fact flightMode4: controller.getParameterFact(-1, _roverFirmware ? "MODE4" : "FLTMODE4")
    property Fact flightMode5: controller.getParameterFact(-1, _roverFirmware ? "MODE5" : "FLTMODE5")
    property Fact flightMode6: controller.getParameterFact(-1, _roverFirmware ? "MODE6" : "FLTMODE6")
Don Gagne's avatar
Don Gagne committed
23

24 25 26 27
    Column {
        anchors.fill:       parent

        VehicleSummaryRow {
28
            labelText: qsTr("Flight Mode 1")
29 30 31 32
            valueText: flightMode1.enumStringValue
        }

        VehicleSummaryRow {
33
            labelText: qsTr("Flight Mode 2")
34 35 36 37
            valueText: flightMode2.enumStringValue
        }

        VehicleSummaryRow {
38
            labelText: qsTr("Flight Mode 3")
39 40 41 42
            valueText: flightMode3.enumStringValue
        }

        VehicleSummaryRow {
43
            labelText: qsTr("Flight Mode 4")
44 45 46 47
            valueText: flightMode4.enumStringValue
        }

        VehicleSummaryRow {
48
            labelText: qsTr("Flight Mode 5")
49 50 51 52
            valueText: flightMode5.enumStringValue
        }

        VehicleSummaryRow {
53
            labelText: qsTr("Flight Mode 6")
54 55
            valueText: flightMode6.enumStringValue
        }
Don Gagne's avatar
Don Gagne committed
56 57
    }
}