ESP8266ComponentSummary.qml 1.84 KB
Newer Older
dogmaphobic's avatar
dogmaphobic committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
import QtQuick 2.2
import QtQuick.Controls 1.2

import QGroundControl.FactSystem    1.0
import QGroundControl.FactControls  1.0
import QGroundControl.Controls      1.0
import QGroundControl.Palette       1.0
import QGroundControl.Controllers   1.0

FactPanel {
    id:             panel
    anchors.fill:   parent
    color:          qgcPal.windowShadeDark

    QGCPalette          { id: qgcPal; colorGroupEnabled: enabled }
    FactPanelController { id: controller; factPanel: panel }

    ESP8266ComponentController {
        id: esp8266
    }

    property Fact debugEnabled:     controller.getParameterFact(esp8266.componentID, "DEBUG_ENABLED")
    property Fact wifiChannel:      controller.getParameterFact(esp8266.componentID, "WIFI_CHANNEL")
    property Fact wifiHostPort:     controller.getParameterFact(esp8266.componentID, "WIFI_UDP_HPORT")
    property Fact wifiClientPort:   controller.getParameterFact(esp8266.componentID, "WIFI_UDP_CPORT")
    property Fact uartBaud:         controller.getParameterFact(esp8266.componentID, "UART_BAUDRATE")

    Column {
        anchors.fill:       parent
        anchors.margins:    8
        VehicleSummaryRow {
            labelText: "WiFi Channel:"
            valueText: wifiChannel.valueString
        }
        VehicleSummaryRow {
            labelText: "WiFi SSID:"
            valueText: esp8266.wifiSSID
        }
        VehicleSummaryRow {
            labelText: "WiFi Password:"
            valueText: esp8266.wifiPassword
        }
        VehicleSummaryRow {
            labelText: "QGC UDP Port:"
            valueText: wifiHostPort.valueString
        }
        VehicleSummaryRow {
            labelText: "UAV UDP Port:"
            valueText: wifiClientPort.valueString
        }
        VehicleSummaryRow {
            labelText: "UART Baud Rate:"
            valueText: uartBaud.valueString
        }
    }
}