Skip to content
APMAirframeComponentSummary.qml 1.28 KiB
Newer Older
import QtQuick 2.3
import QtQuick.Controls 1.2
import QGroundControl.FactSystem 1.0
import QGroundControl.FactControls 1.0
import QGroundControl.Controls 1.0
import QGroundControl.Controllers 1.0
import QGroundControl.Palette 1.0
Item {
    anchors.fill:       parent

    APMAirframeComponentController {id: controller; }
DonLakeFlyer's avatar
 
DonLakeFlyer committed
    property Fact _frameClass:          controller.getParameterFact(-1, "FRAME_CLASS")
    property Fact _frameType:           controller.getParameterFact(-1, "FRAME_TYPE", false)
DonLakeFlyer's avatar
 
DonLakeFlyer committed
    property bool _frameTypeAvailable:  controller.parameterExists(-1, "FRAME_TYPE")
    Column {
dogmaphobic's avatar
dogmaphobic committed
        anchors.fill:       parent
            labelText:  qsTr("Frame Class")
DonLakeFlyer's avatar
 
DonLakeFlyer committed
            valueText:  _frameClass.enumStringValue
        VehicleSummaryRow {
            labelText:  qsTr("Frame Type")
            valueText:  visible ? _frameType.enumStringValue : ""
DonLakeFlyer's avatar
 
DonLakeFlyer committed
            visible:    _frameTypeAvailable

        VehicleSummaryRow {
            labelText: qsTr("Firmware Version")
            valueText: activeVehicle.firmwareMajorVersion == -1 ? qsTr("Unknown") : activeVehicle.firmwareMajorVersion + "." + activeVehicle.firmwareMinorVersion + "." + activeVehicle.firmwarePatchVersion + activeVehicle.firmwareVersionTypeString
        }