|
|
|
@ -40,13 +40,16 @@ QGCView {
@@ -40,13 +40,16 @@ QGCView {
|
|
|
|
|
|
|
|
|
|
QGCPalette { id: palette; colorGroupEnabled: panel.enabled } |
|
|
|
|
|
|
|
|
|
property int _firstColumn: ScreenTools.defaultFontPixelWidth * 20 |
|
|
|
|
property int _secondColumn: ScreenTools.defaultFontPixelWidth * 18 |
|
|
|
|
property real _margins: ScreenTools.defaultFontPixelHeight |
|
|
|
|
property real _middleRowWidth: ScreenTools.defaultFontPixelWidth * 18 |
|
|
|
|
property real _editFieldWidth: ScreenTools.defaultFontPixelWidth * 18 |
|
|
|
|
property real _labelWidth: ScreenTools.defaultFontPixelWidth * 10 |
|
|
|
|
property real _statusWidth: ScreenTools.defaultFontPixelWidth * 5 |
|
|
|
|
|
|
|
|
|
readonly property string dialogTitle: qsTr("controller WiFi Bridge") |
|
|
|
|
property int stStatus: XMLHttpRequest.UNSENT |
|
|
|
|
property int stErrorCount: 0 |
|
|
|
|
property bool stEnabled: false |
|
|
|
|
property bool stResetCounters: false |
|
|
|
|
property bool stResetCounters:false |
|
|
|
|
|
|
|
|
|
ESP8266ComponentController { |
|
|
|
|
id: controller |
|
|
|
@ -79,24 +82,21 @@ QGCView {
@@ -79,24 +82,21 @@ QGCView {
|
|
|
|
|
if (objectArray.errors !== undefined) { |
|
|
|
|
console.log(qsTr("Error fetching WiFi Bridge Status: %1").arg(objectArray.errors[0].message)) |
|
|
|
|
stErrorCount = stErrorCount + 1 |
|
|
|
|
if(stErrorCount < 2 && stEnabled) |
|
|
|
|
if(stErrorCount < 2) |
|
|
|
|
timer.start() |
|
|
|
|
} else { |
|
|
|
|
if(stEnabled) { |
|
|
|
|
//-- This should work but it doesn't |
|
|
|
|
// var n = 34523453.345 |
|
|
|
|
// n.toLocaleString() |
|
|
|
|
// "34,523,453.345" |
|
|
|
|
vpackets.text = thisThingHasNoNumberLocaleSupport(objectArray["vpackets"]) |
|
|
|
|
vsent.text = thisThingHasNoNumberLocaleSupport(objectArray["vsent"]) |
|
|
|
|
vlost.text = thisThingHasNoNumberLocaleSupport(objectArray["vlost"]) |
|
|
|
|
gpackets.text = thisThingHasNoNumberLocaleSupport(objectArray["gpackets"]) |
|
|
|
|
gsent.text = thisThingHasNoNumberLocaleSupport(objectArray["gsent"]) |
|
|
|
|
glost.text = thisThingHasNoNumberLocaleSupport(objectArray["glost"]) |
|
|
|
|
stErrorCount = 0 |
|
|
|
|
wifiStatus.visible = true |
|
|
|
|
timer.start() |
|
|
|
|
} |
|
|
|
|
//-- This should work but it doesn't |
|
|
|
|
// var n = 34523453.345 |
|
|
|
|
// n.toLocaleString() |
|
|
|
|
// "34,523,453.345" |
|
|
|
|
vpackets.text = thisThingHasNoNumberLocaleSupport(objectArray["vpackets"]) |
|
|
|
|
vsent.text = thisThingHasNoNumberLocaleSupport(objectArray["vsent"]) |
|
|
|
|
vlost.text = thisThingHasNoNumberLocaleSupport(objectArray["vlost"]) |
|
|
|
|
gpackets.text = thisThingHasNoNumberLocaleSupport(objectArray["gpackets"]) |
|
|
|
|
gsent.text = thisThingHasNoNumberLocaleSupport(objectArray["gsent"]) |
|
|
|
|
glost.text = thisThingHasNoNumberLocaleSupport(objectArray["glost"]) |
|
|
|
|
stErrorCount = 0 |
|
|
|
|
timer.start() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -107,6 +107,7 @@ QGCView {
@@ -107,6 +107,7 @@ QGCView {
|
|
|
|
|
timer.interval = 1000 |
|
|
|
|
timer.repeat = true |
|
|
|
|
timer.triggered.connect(updateStatus) |
|
|
|
|
timer.start() |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
property Fact wifiMode: controller.getParameterFact(controller.componentID, "WIFI_MODE", false) //-- Don't bitch about missing as this is new |
|
|
|
@ -119,284 +120,353 @@ QGCView {
@@ -119,284 +120,353 @@ QGCView {
|
|
|
|
|
anchors.fill: parent |
|
|
|
|
|
|
|
|
|
Flickable { |
|
|
|
|
anchors.fill: parent |
|
|
|
|
clip: true |
|
|
|
|
contentHeight: innerColumn.height |
|
|
|
|
contentWidth: panel.width |
|
|
|
|
boundsBehavior: Flickable.StopAtBounds |
|
|
|
|
flickableDirection: Flickable.VerticalFlick |
|
|
|
|
|
|
|
|
|
clip: true |
|
|
|
|
anchors.fill: parent |
|
|
|
|
contentHeight: mainCol.height |
|
|
|
|
flickableDirection: Flickable.VerticalFlick |
|
|
|
|
Column { |
|
|
|
|
id: innerColumn |
|
|
|
|
width: panel.width |
|
|
|
|
spacing: ScreenTools.defaultFontPixelHeight * 0.5 |
|
|
|
|
|
|
|
|
|
id: mainCol |
|
|
|
|
spacing: _margins |
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
Item { width: 1; height: _margins * 0.5; } |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("WiFi Bridge Settings") |
|
|
|
|
font.weight: Font.DemiBold |
|
|
|
|
text: qsTr("ESP WiFi Bridge Settings") |
|
|
|
|
font.weight: Font.DemiBold |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
width: parent.width |
|
|
|
|
height: wifiStatus.visible ? Math.max(wifiCol.height, wifiStatus.height) + (ScreenTools.defaultFontPixelHeight * 2) : wifiCol.height + (ScreenTools.defaultFontPixelHeight * 2) |
|
|
|
|
color: palette.windowShade |
|
|
|
|
color: palette.windowShade |
|
|
|
|
width: statusLayout.width + _margins * 4 |
|
|
|
|
height: settingsRow.height + _margins * 2 |
|
|
|
|
Row { |
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
Rectangle { |
|
|
|
|
height: parent.height |
|
|
|
|
width: 1 |
|
|
|
|
color: palette.window |
|
|
|
|
id: settingsRow |
|
|
|
|
spacing: _margins |
|
|
|
|
anchors.centerIn: parent |
|
|
|
|
Item { width: _margins * 0.5; height: 1; } |
|
|
|
|
QGCColoredImage { |
|
|
|
|
color: palette.text |
|
|
|
|
height: ScreenTools.defaultFontPixelWidth * 10 |
|
|
|
|
width: ScreenTools.defaultFontPixelWidth * 12 |
|
|
|
|
mipmap: true |
|
|
|
|
fillMode: Image.PreserveAspectFit |
|
|
|
|
source: wifiMode ? (wifiMode.value === 0 ? "/qmlimages/APMode.svg" : "/qmlimages/StationMode.svg") : "/qmlimages/APMode.svg" |
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
} |
|
|
|
|
Item { width: _margins * 0.5; height: 1; } |
|
|
|
|
Column { |
|
|
|
|
id: wifiCol |
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
spacing: ScreenTools.defaultFontPixelHeight / 2 |
|
|
|
|
spacing: _margins * 0.5 |
|
|
|
|
anchors.verticalCenter: parent.verticalCenter |
|
|
|
|
Row { |
|
|
|
|
visible: wifiMode |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
visible: wifiMode |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("WiFi Mode") |
|
|
|
|
width: _firstColumn |
|
|
|
|
anchors.baseline: modeField.baseline |
|
|
|
|
text: qsTr("WiFi Mode") |
|
|
|
|
width: _middleRowWidth |
|
|
|
|
anchors.baseline: modeField.baseline |
|
|
|
|
} |
|
|
|
|
QGCComboBox { |
|
|
|
|
id: modeField |
|
|
|
|
width: _secondColumn |
|
|
|
|
model: ["Access Point Mode", "Station Mode"] |
|
|
|
|
currentIndex: wifiMode ? wifiMode.value : 0 |
|
|
|
|
id: modeField |
|
|
|
|
width: _editFieldWidth |
|
|
|
|
model: ["Access Point Mode", "Station Mode"] |
|
|
|
|
currentIndex: wifiMode ? wifiMode.value : 0 |
|
|
|
|
onActivated: { |
|
|
|
|
wifiMode.value = index |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("WiFi Channel") |
|
|
|
|
width: _firstColumn |
|
|
|
|
anchors.baseline: channelField.baseline |
|
|
|
|
text: qsTr("WiFi Channel") |
|
|
|
|
width: _middleRowWidth |
|
|
|
|
anchors.baseline: channelField.baseline |
|
|
|
|
} |
|
|
|
|
QGCComboBox { |
|
|
|
|
id: channelField |
|
|
|
|
width: _secondColumn |
|
|
|
|
enabled: wifiMode && wifiMode.value === 0 |
|
|
|
|
model: controller.wifiChannels |
|
|
|
|
currentIndex: wifiChannel ? wifiChannel.value - 1 : 0 |
|
|
|
|
id: channelField |
|
|
|
|
width: _editFieldWidth |
|
|
|
|
enabled: wifiMode && wifiMode.value === 0 |
|
|
|
|
model: controller.wifiChannels |
|
|
|
|
currentIndex: wifiChannel ? wifiChannel.value - 1 : 0 |
|
|
|
|
onActivated: { |
|
|
|
|
wifiChannel.value = index + 1 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("WiFi SSID") |
|
|
|
|
width: _firstColumn |
|
|
|
|
anchors.baseline: ssidField.baseline |
|
|
|
|
} |
|
|
|
|
text: qsTr("WiFi AP SSID") |
|
|
|
|
width: _middleRowWidth |
|
|
|
|
anchors.baseline: ssidField.baseline |
|
|
|
|
} |
|
|
|
|
QGCTextField { |
|
|
|
|
id: ssidField |
|
|
|
|
width: _secondColumn |
|
|
|
|
text: controller.wifiSSID |
|
|
|
|
maximumLength: 16 |
|
|
|
|
id: ssidField |
|
|
|
|
width: _editFieldWidth |
|
|
|
|
text: controller.wifiSSID |
|
|
|
|
maximumLength: 16 |
|
|
|
|
onEditingFinished: { |
|
|
|
|
controller.wifiSSID = text |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("WiFi Password") |
|
|
|
|
width: _firstColumn |
|
|
|
|
anchors.baseline: passwordField.baseline |
|
|
|
|
} |
|
|
|
|
text: qsTr("WiFi AP Password") |
|
|
|
|
width: _middleRowWidth |
|
|
|
|
anchors.baseline: passwordField.baseline |
|
|
|
|
} |
|
|
|
|
QGCTextField { |
|
|
|
|
id: passwordField |
|
|
|
|
width: _secondColumn |
|
|
|
|
text: controller.wifiPassword |
|
|
|
|
maximumLength: 16 |
|
|
|
|
id: passwordField |
|
|
|
|
width: _editFieldWidth |
|
|
|
|
text: controller.wifiPassword |
|
|
|
|
maximumLength: 16 |
|
|
|
|
onEditingFinished: { |
|
|
|
|
controller.wifiPassword = text |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("UART Baud Rate") |
|
|
|
|
width: _firstColumn |
|
|
|
|
anchors.baseline: baudField.baseline |
|
|
|
|
text: qsTr("WiFi STA SSID") |
|
|
|
|
width: _middleRowWidth |
|
|
|
|
anchors.baseline: stassidField.baseline |
|
|
|
|
} |
|
|
|
|
QGCComboBox { |
|
|
|
|
id: baudField |
|
|
|
|
width: _secondColumn |
|
|
|
|
model: controller.baudRates |
|
|
|
|
currentIndex: controller.baudIndex |
|
|
|
|
onActivated: { |
|
|
|
|
controller.baudIndex = index |
|
|
|
|
QGCTextField { |
|
|
|
|
id: stassidField |
|
|
|
|
width: _editFieldWidth |
|
|
|
|
text: controller.wifiSSIDSta |
|
|
|
|
maximumLength: 16 |
|
|
|
|
enabled: wifiMode && wifiMode.value === 1 |
|
|
|
|
onEditingFinished: { |
|
|
|
|
controller.wifiSSIDSta = text |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("QGC UDP Port") |
|
|
|
|
width: _firstColumn |
|
|
|
|
anchors.baseline: qgcportField.baseline |
|
|
|
|
text: qsTr("WiFi STA Password") |
|
|
|
|
width: _middleRowWidth |
|
|
|
|
anchors.baseline: passwordStaField.baseline |
|
|
|
|
} |
|
|
|
|
QGCTextField { |
|
|
|
|
id: qgcportField |
|
|
|
|
width: _secondColumn |
|
|
|
|
text: hostPort ? hostPort.valueString : "" |
|
|
|
|
validator: IntValidator {bottom: 1024; top: 65535;} |
|
|
|
|
inputMethodHints: Qt.ImhDigitsOnly |
|
|
|
|
id: passwordStaField |
|
|
|
|
width: _editFieldWidth |
|
|
|
|
text: controller.wifiPasswordSta |
|
|
|
|
maximumLength: 16 |
|
|
|
|
enabled: wifiMode && wifiMode.value === 1 |
|
|
|
|
onEditingFinished: { |
|
|
|
|
hostPort.value = text |
|
|
|
|
controller.wifiPasswordSta = text |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Rectangle { |
|
|
|
|
height: parent.height |
|
|
|
|
width: 1 |
|
|
|
|
color: palette.text |
|
|
|
|
visible: wifiStatus.visible |
|
|
|
|
} |
|
|
|
|
Column { |
|
|
|
|
id: wifiStatus |
|
|
|
|
anchors.margins: ScreenTools.defaultFontPixelHeight / 2 |
|
|
|
|
spacing: ScreenTools.defaultFontPixelHeight / 2 |
|
|
|
|
visible: false |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Bridge/Vehicle Link") |
|
|
|
|
font.weight: Font.DemiBold |
|
|
|
|
} |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Messages Received") |
|
|
|
|
width: _firstColumn |
|
|
|
|
} |
|
|
|
|
QGCLabel { |
|
|
|
|
id: vpackets |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Messages Lost") |
|
|
|
|
width: _firstColumn |
|
|
|
|
} |
|
|
|
|
QGCLabel { |
|
|
|
|
id: vlost |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Messages Sent") |
|
|
|
|
width: _firstColumn |
|
|
|
|
} |
|
|
|
|
QGCLabel { |
|
|
|
|
id: vsent |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Rectangle { |
|
|
|
|
height: 1 |
|
|
|
|
width: parent.width |
|
|
|
|
color: palette.text |
|
|
|
|
} |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Bridge/QGC Link") |
|
|
|
|
font.weight: Font.DemiBold |
|
|
|
|
} |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Messages Received") |
|
|
|
|
width: _firstColumn |
|
|
|
|
} |
|
|
|
|
QGCLabel { |
|
|
|
|
id: gpackets |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Messages Lost") |
|
|
|
|
width: _firstColumn |
|
|
|
|
} |
|
|
|
|
QGCLabel { |
|
|
|
|
id: glost |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Messages Sent") |
|
|
|
|
width: _firstColumn |
|
|
|
|
} |
|
|
|
|
QGCLabel { |
|
|
|
|
id: gsent |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Rectangle { |
|
|
|
|
height: 1 |
|
|
|
|
width: parent.width |
|
|
|
|
color: palette.text |
|
|
|
|
} |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("QGC/Bridge Link") |
|
|
|
|
font.weight: Font.DemiBold |
|
|
|
|
} |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Messages Received") |
|
|
|
|
width: _firstColumn |
|
|
|
|
text: qsTr("UART Baud Rate") |
|
|
|
|
width: _middleRowWidth |
|
|
|
|
anchors.baseline: baudField.baseline |
|
|
|
|
} |
|
|
|
|
QGCLabel { |
|
|
|
|
text: controller.vehicle ? thisThingHasNoNumberLocaleSupport(controller.vehicle.messagesReceived) : 0 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Messages Lost") |
|
|
|
|
width: _firstColumn |
|
|
|
|
} |
|
|
|
|
QGCLabel { |
|
|
|
|
text: controller.vehicle ? thisThingHasNoNumberLocaleSupport(controller.vehicle.messagesLost) : 0 |
|
|
|
|
QGCComboBox { |
|
|
|
|
id: baudField |
|
|
|
|
width: _editFieldWidth |
|
|
|
|
model: controller.baudRates |
|
|
|
|
currentIndex: controller.baudIndex |
|
|
|
|
onActivated: { |
|
|
|
|
controller.baudIndex = index |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Messages Sent") |
|
|
|
|
width: _firstColumn |
|
|
|
|
text: qsTr("QGC UDP Port") |
|
|
|
|
width: _middleRowWidth |
|
|
|
|
anchors.baseline: qgcportField.baseline |
|
|
|
|
} |
|
|
|
|
QGCLabel { |
|
|
|
|
text: controller.vehicle ? thisThingHasNoNumberLocaleSupport(controller.vehicle.messagesSent) : 0 |
|
|
|
|
QGCTextField { |
|
|
|
|
id: qgcportField |
|
|
|
|
width: _editFieldWidth |
|
|
|
|
text: hostPort ? hostPort.valueString : "" |
|
|
|
|
validator: IntValidator {bottom: 1024; top: 65535;} |
|
|
|
|
inputMethodHints: Qt.ImhDigitsOnly |
|
|
|
|
onEditingFinished: { |
|
|
|
|
hostPort.value = text |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("ESP WiFi Bridge Status") |
|
|
|
|
font.weight: Font.DemiBold |
|
|
|
|
} |
|
|
|
|
Rectangle { |
|
|
|
|
color: palette.windowShade |
|
|
|
|
width: statusLayout.width + _margins * 4 |
|
|
|
|
height: statusLayout.height + _margins * 2 |
|
|
|
|
GridLayout { |
|
|
|
|
id: statusLayout |
|
|
|
|
columns: 3 |
|
|
|
|
columnSpacing: _margins * 2 |
|
|
|
|
anchors.centerIn: parent |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Bridge/Vehicle Link") |
|
|
|
|
Layout.alignment: Qt.AlignHCenter |
|
|
|
|
} |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Bridge/QGC Link") |
|
|
|
|
Layout.alignment: Qt.AlignHCenter |
|
|
|
|
} |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("QGC/Bridge Link") |
|
|
|
|
Layout.alignment: Qt.AlignHCenter |
|
|
|
|
} |
|
|
|
|
Row { |
|
|
|
|
spacing: _margins |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Messages Received") |
|
|
|
|
font.pixelSize: ScreenTools.smallFontPixelSize |
|
|
|
|
width: _labelWidth |
|
|
|
|
} |
|
|
|
|
QGCLabel { |
|
|
|
|
id: vpackets |
|
|
|
|
font.pixelSize: ScreenTools.smallFontPixelSize |
|
|
|
|
width: _statusWidth |
|
|
|
|
horizontalAlignment: Text.AlignRight |
|
|
|
|
font.family: "Monospace" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Row { |
|
|
|
|
spacing: _margins |
|
|
|
|
QGCLabel { |
|
|
|
|
font.pixelSize: ScreenTools.smallFontPixelSize |
|
|
|
|
text: qsTr("Messages Received") |
|
|
|
|
width: _labelWidth |
|
|
|
|
} |
|
|
|
|
QGCLabel { |
|
|
|
|
id: gpackets |
|
|
|
|
font.pixelSize: ScreenTools.smallFontPixelSize |
|
|
|
|
width: _statusWidth |
|
|
|
|
horizontalAlignment: Text.AlignRight |
|
|
|
|
font.family: "Monospace" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Row { |
|
|
|
|
spacing: _margins |
|
|
|
|
QGCLabel { |
|
|
|
|
font.pixelSize: ScreenTools.smallFontPixelSize |
|
|
|
|
text: qsTr("Messages Received") |
|
|
|
|
width: _labelWidth |
|
|
|
|
} |
|
|
|
|
QGCLabel { |
|
|
|
|
font.pixelSize: ScreenTools.smallFontPixelSize |
|
|
|
|
text: controller.vehicle ? thisThingHasNoNumberLocaleSupport(controller.vehicle.messagesReceived) : 0 |
|
|
|
|
width: _statusWidth |
|
|
|
|
horizontalAlignment: Text.AlignRight |
|
|
|
|
font.family: "Monospace" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Row { |
|
|
|
|
spacing: _margins |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Messages Lost") |
|
|
|
|
font.pixelSize: ScreenTools.smallFontPixelSize |
|
|
|
|
width: _labelWidth |
|
|
|
|
} |
|
|
|
|
QGCLabel { |
|
|
|
|
id: vlost |
|
|
|
|
width: _statusWidth |
|
|
|
|
horizontalAlignment: Text.AlignRight |
|
|
|
|
font.pixelSize: ScreenTools.smallFontPixelSize |
|
|
|
|
font.family: "Monospace" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Row { |
|
|
|
|
spacing: _margins |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Messages Lost") |
|
|
|
|
font.pixelSize: ScreenTools.smallFontPixelSize |
|
|
|
|
width: _labelWidth |
|
|
|
|
} |
|
|
|
|
QGCLabel { |
|
|
|
|
id: glost |
|
|
|
|
width: _statusWidth |
|
|
|
|
horizontalAlignment: Text.AlignRight |
|
|
|
|
font.pixelSize: ScreenTools.smallFontPixelSize |
|
|
|
|
font.family: "Monospace" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Row { |
|
|
|
|
spacing: _margins |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Messages Lost") |
|
|
|
|
font.pixelSize: ScreenTools.smallFontPixelSize |
|
|
|
|
width: _labelWidth |
|
|
|
|
} |
|
|
|
|
QGCLabel { |
|
|
|
|
text: controller.vehicle ? thisThingHasNoNumberLocaleSupport(controller.vehicle.messagesLost) : 0 |
|
|
|
|
width: _statusWidth |
|
|
|
|
horizontalAlignment: Text.AlignRight |
|
|
|
|
font.pixelSize: ScreenTools.smallFontPixelSize |
|
|
|
|
font.family: "Monospace" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Row { |
|
|
|
|
spacing: _margins |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Messages Sent") |
|
|
|
|
font.pixelSize: ScreenTools.smallFontPixelSize |
|
|
|
|
width: _labelWidth |
|
|
|
|
} |
|
|
|
|
QGCLabel { |
|
|
|
|
id: vsent |
|
|
|
|
width: _statusWidth |
|
|
|
|
horizontalAlignment: Text.AlignRight |
|
|
|
|
font.pixelSize: ScreenTools.smallFontPixelSize |
|
|
|
|
font.family: "Monospace" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Row { |
|
|
|
|
spacing: _margins |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Messages Sent") |
|
|
|
|
font.pixelSize: ScreenTools.smallFontPixelSize |
|
|
|
|
width: _labelWidth |
|
|
|
|
} |
|
|
|
|
QGCLabel { |
|
|
|
|
id: gsent |
|
|
|
|
width: _statusWidth |
|
|
|
|
horizontalAlignment: Text.AlignRight |
|
|
|
|
font.pixelSize: ScreenTools.smallFontPixelSize |
|
|
|
|
font.family: "Monospace" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Row { |
|
|
|
|
spacing: _margins |
|
|
|
|
QGCLabel { |
|
|
|
|
text: qsTr("Messages Sent") |
|
|
|
|
font.pixelSize: ScreenTools.smallFontPixelSize |
|
|
|
|
width: _labelWidth |
|
|
|
|
} |
|
|
|
|
QGCLabel { |
|
|
|
|
text: controller.vehicle ? thisThingHasNoNumberLocaleSupport(controller.vehicle.messagesSent) : 0 |
|
|
|
|
width: _statusWidth |
|
|
|
|
horizontalAlignment: Text.AlignRight |
|
|
|
|
font.pixelSize: ScreenTools.smallFontPixelSize |
|
|
|
|
font.family: "Monospace" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Row { |
|
|
|
|
spacing: ScreenTools.defaultFontPixelWidth * 1.5 |
|
|
|
|
spacing: _margins |
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
QGCButton { |
|
|
|
|
text: qsTr("Restore Defaults") |
|
|
|
|
width: ScreenTools.defaultFontPixelWidth * 16 |
|
|
|
|
text: qsTr("Restore Defaults") |
|
|
|
|
width: ScreenTools.defaultFontPixelWidth * 16 |
|
|
|
|
onClicked: { |
|
|
|
|
controller.restoreDefaults() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
QGCButton { |
|
|
|
|
text: qsTr("Restart WiFi Bridge") |
|
|
|
|
enabled: !controller.busy |
|
|
|
|
width: ScreenTools.defaultFontPixelWidth * 16 |
|
|
|
|
text: qsTr("Restart WiFi Bridge") |
|
|
|
|
enabled: !controller.busy |
|
|
|
|
width: ScreenTools.defaultFontPixelWidth * 16 |
|
|
|
|
onClicked: { |
|
|
|
|
rebootDialog.visible = true |
|
|
|
|
} |
|
|
|
@ -417,23 +487,8 @@ QGCView {
@@ -417,23 +487,8 @@ QGCView {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
QGCButton { |
|
|
|
|
text: stEnabled ? qsTr("Hide Status") : qsTr("Show Status") |
|
|
|
|
width: ScreenTools.defaultFontPixelWidth * 16 |
|
|
|
|
onClicked: { |
|
|
|
|
stEnabled = !stEnabled |
|
|
|
|
if(stEnabled) |
|
|
|
|
updateStatus() |
|
|
|
|
else { |
|
|
|
|
wifiStatus.visible = false |
|
|
|
|
timer.stop() |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
QGCButton { |
|
|
|
|
text: qsTr("Reset Counters") |
|
|
|
|
visible: stEnabled |
|
|
|
|
enabled: stEnabled |
|
|
|
|
width: ScreenTools.defaultFontPixelWidth * 16 |
|
|
|
|
text: qsTr("Reset Counters") |
|
|
|
|
width: ScreenTools.defaultFontPixelWidth * 16 |
|
|
|
|
onClicked: { |
|
|
|
|
stResetCounters = true; |
|
|
|
|
updateStatus() |
|
|
|
|