AirframeComponentSummary.qml 1.1 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
import QGroundControl.Controllers 1.0
8

9 10 11
FactPanel {
    id:             panel
    anchors.fill:   parent
12

13
    AirframeComponentController { id: controller; factPanel: panel }
14

15 16
    Fact { id: sysIdFact;           name: "MAV_SYS_ID";     onFactMissing: showMissingFactOverlay(name) }
    Fact { id: sysAutoStartFact;    name: "SYS_AUTOSTART";  onFactMissing: showMissingFactOverlay(name) }
17

18
    property bool autoStartSet: sysAutoStartFact.value != 0
19

20 21 22
    Column {
        anchors.fill: parent
        anchors.margins: 8
23

24 25 26 27 28 29 30 31 32
        VehicleSummaryRow {
            labelText: "System ID:"
            valueText: sysIdFact.valueString
        }

        VehicleSummaryRow {
            labelText: "Airframe type:"
            valueText: autoStartSet ? controller.currentAirframeType : "Setup required"
        }
33

34 35 36 37
        VehicleSummaryRow {
            labelText: "Vehicle:"
            valueText: autoStartSet ? controller.currentVehicleName : "Setup required"
        }
38
    }
39
}