Add buttons to trigger another wifi scan
This commit is contained in:
@@ -103,6 +103,7 @@ qt_add_qml_module(evcharger-app
|
||||
qml/SecurityPage.qml
|
||||
qml/SelectLogicModeItem.qml
|
||||
qml/SelectPhaseSwitchModeItem.qml
|
||||
qml/SendMessageButton.qml
|
||||
qml/SensorsConfigurationPage.qml
|
||||
qml/SetPriceLimitPage.qml
|
||||
qml/SettingsTabPage.qml
|
||||
|
@@ -1423,27 +1423,27 @@
|
||||
<translation>Start</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/FirmwarePage.qml" line="121"/>
|
||||
<location filename="../qml/FirmwarePage.qml" line="114"/>
|
||||
<source>Abort</source>
|
||||
<translation>Abbrechen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/FirmwarePage.qml" line="146"/>
|
||||
<location filename="../qml/FirmwarePage.qml" line="120"/>
|
||||
<source>Switch partition</source>
|
||||
<translation>Partition tauschen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/FirmwarePage.qml" line="167"/>
|
||||
<location filename="../qml/FirmwarePage.qml" line="129"/>
|
||||
<source>Update status:</source>
|
||||
<translation>Update status:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/FirmwarePage.qml" line="195"/>
|
||||
<location filename="../qml/FirmwarePage.qml" line="157"/>
|
||||
<source>Update progress:</source>
|
||||
<translation>Update Fortschritt:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/FirmwarePage.qml" line="226"/>
|
||||
<location filename="../qml/FirmwarePage.qml" line="188"/>
|
||||
<source>Update message:</source>
|
||||
<translation>Update Meldung:</translation>
|
||||
</message>
|
||||
@@ -1930,39 +1930,54 @@
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../flotten-updater/mainwindow.cpp" line="120"/>
|
||||
<source>Reset nvs key...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../flotten-updater/mainwindow.cpp" line="121"/>
|
||||
<source>Open app(s)...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../flotten-updater/mainwindow.cpp" line="124"/>
|
||||
<location filename="../../flotten-updater/mainwindow.cpp" line="125"/>
|
||||
<source>Enter update url...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../flotten-updater/mainwindow.cpp" line="124"/>
|
||||
<location filename="../../flotten-updater/mainwindow.cpp" line="125"/>
|
||||
<source>Update url:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../flotten-updater/mainwindow.cpp" line="140"/>
|
||||
<location filename="../../flotten-updater/mainwindow.cpp" line="141"/>
|
||||
<source>Select update release...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../flotten-updater/mainwindow.cpp" line="142"/>
|
||||
<location filename="../../flotten-updater/mainwindow.cpp" line="143"/>
|
||||
<source>Update release</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../flotten-updater/mainwindow.cpp" line="159"/>
|
||||
<location filename="../../flotten-updater/mainwindow.cpp" line="160"/>
|
||||
<source>Are you sure?</source>
|
||||
<translation type="unfinished">Sind Sie sicher?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../flotten-updater/mainwindow.cpp" line="159"/>
|
||||
<location filename="../../flotten-updater/mainwindow.cpp" line="160"/>
|
||||
<source>Do you really want to reboot selected devices?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../flotten-updater/mainwindow.cpp" line="227"/>
|
||||
<source>Please input nvs key to be reset</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../flotten-updater/mainwindow.cpp" line="227"/>
|
||||
<source>Nvs key</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>MqttPage</name>
|
||||
@@ -2924,27 +2939,46 @@
|
||||
<translation>Status:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/WiFiPage.qml" line="58"/>
|
||||
<source>(%0) Wi-Fi Scan</source>
|
||||
<translation>(%0) Wi-Fi Scan</translation>
|
||||
<location filename="../qml/WiFiPage.qml" line="51"/>
|
||||
<source>Scan-Status:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/WiFiPage.qml" line="77"/>
|
||||
<location filename="../qml/WiFiPage.qml" line="76"/>
|
||||
<source>Scan-Age:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/WiFiPage.qml" line="95"/>
|
||||
<source>Trigger scan</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/WiFiPage.qml" line="106"/>
|
||||
<source>(%0) Scan Result</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>(%0) Wi-Fi Scan</source>
|
||||
<translation type="vanished">(%0) Wi-Fi Scan</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/WiFiPage.qml" line="126"/>
|
||||
<source>(%0) Wi-Fi Errors</source>
|
||||
<translation>(%0) WLAN Probleme</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/WiFiPage.qml" line="90"/>
|
||||
<location filename="../qml/WiFiPage.qml" line="139"/>
|
||||
<source>Min RSSI</source>
|
||||
<translation>Min RSSI</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/WiFiPage.qml" line="101"/>
|
||||
<location filename="../qml/WiFiPage.qml" line="150"/>
|
||||
<source>Pmf capable</source>
|
||||
<translation>Pmf fähig</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../qml/WiFiPage.qml" line="106"/>
|
||||
<location filename="../qml/WiFiPage.qml" line="155"/>
|
||||
<source>Pmf required</source>
|
||||
<translation>Pmf erforderlich</translation>
|
||||
</message>
|
||||
|
@@ -109,54 +109,16 @@ NavigationPage {
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
SendMessageButton {
|
||||
Layout.fillWidth: true
|
||||
|
||||
SendMessageHelper {
|
||||
id: abortFirmwareUpdate
|
||||
deviceConnection: theDeviceConnection
|
||||
}
|
||||
|
||||
Button {
|
||||
text: qsTr("Abort")
|
||||
|
||||
onClicked: abortFirmwareUpdate.sendMessage({
|
||||
type: "abortFwUpdate"
|
||||
})
|
||||
}
|
||||
|
||||
BusyIndicator {
|
||||
visible: abortFirmwareUpdate.pending
|
||||
}
|
||||
|
||||
RequestStatusText {
|
||||
request: abortFirmwareUpdate
|
||||
}
|
||||
text: qsTr("Abort")
|
||||
messageType: "abortFwUpdate"
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
SendMessageButton {
|
||||
Layout.fillWidth: true
|
||||
|
||||
SendMessageHelper {
|
||||
id: switchAppPartition
|
||||
deviceConnection: theDeviceConnection
|
||||
}
|
||||
|
||||
Button {
|
||||
text: qsTr("Switch partition")
|
||||
|
||||
onClicked: switchAppPartition.sendMessage({
|
||||
type: "switchAppPartition"
|
||||
})
|
||||
}
|
||||
|
||||
BusyIndicator {
|
||||
visible: switchAppPartition.pending
|
||||
}
|
||||
|
||||
RequestStatusText {
|
||||
request: switchAppPartition
|
||||
}
|
||||
text: qsTr("Switch partition")
|
||||
messageType: "switchAppPartition"
|
||||
}
|
||||
|
||||
GridLayout {
|
||||
|
32
evcharger-app/qml/SendMessageButton.qml
Normal file
32
evcharger-app/qml/SendMessageButton.qml
Normal file
@@ -0,0 +1,32 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import EVChargerApp
|
||||
|
||||
RowLayout {
|
||||
id: rowLayout
|
||||
|
||||
required property string messageType
|
||||
required property string text
|
||||
|
||||
SendMessageHelper {
|
||||
id: helper
|
||||
deviceConnection: theDeviceConnection
|
||||
}
|
||||
|
||||
Button {
|
||||
text: rowLayout.text
|
||||
|
||||
onClicked: helper.sendMessage({
|
||||
type: messageType
|
||||
})
|
||||
}
|
||||
|
||||
BusyIndicator {
|
||||
visible: helper.pending
|
||||
}
|
||||
|
||||
RequestStatusText {
|
||||
request: helper
|
||||
}
|
||||
}
|
@@ -46,23 +46,72 @@ NavigationPage {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
ApiKeyValueHelper {
|
||||
id: wifiScanResult
|
||||
deviceConnection: theDeviceConnection
|
||||
apiKey: "scan"
|
||||
Text {
|
||||
text: qsTr("Scan-Status:")
|
||||
}
|
||||
|
||||
text: qsTr("(%0) Wi-Fi Scan").arg(wifiScanResult.value == null ? 0 : wifiScanResult.value.length)
|
||||
onClicked: stackView.push(wiFiScanPageComponent, {wifiScanResult} )
|
||||
enabled: wifiScanResult.value != null
|
||||
Text {
|
||||
Layout.fillWidth: true
|
||||
|
||||
Component {
|
||||
id: wiFiScanPageComponent
|
||||
ApiKeyValueHelper {
|
||||
id: scanStatus
|
||||
deviceConnection: theDeviceConnection
|
||||
apiKey: "scas"
|
||||
}
|
||||
|
||||
WiFiScanPage {
|
||||
text: {
|
||||
switch (scanStatus.value)
|
||||
{
|
||||
case 0: return "None"
|
||||
case 1: return "Scanning"
|
||||
case 2: return "Finished"
|
||||
case 3: return "Failed"
|
||||
default: return scanStatus.value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
text: qsTr("Scan-Age:")
|
||||
}
|
||||
|
||||
Text {
|
||||
Layout.fillWidth: true
|
||||
|
||||
ApiKeyValueHelper {
|
||||
id: scanAgeStatus
|
||||
deviceConnection: theDeviceConnection
|
||||
apiKey: "scaa"
|
||||
}
|
||||
|
||||
text: scanAgeStatus.value != null ? formatDuration(scanAgeStatus.value - rebootTime.value) : null
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
SendMessageButton {
|
||||
Layout.fillWidth: true
|
||||
text: qsTr("Trigger scan")
|
||||
messageType: "wifiScan"
|
||||
}
|
||||
|
||||
Button {
|
||||
ApiKeyValueHelper {
|
||||
id: wifiScanResult
|
||||
deviceConnection: theDeviceConnection
|
||||
apiKey: "scan"
|
||||
}
|
||||
|
||||
text: qsTr("(%0) Scan Result").arg(wifiScanResult.value == null ? 0 : wifiScanResult.value.length)
|
||||
onClicked: stackView.push(wiFiScanPageComponent, {wifiScanResult} )
|
||||
enabled: wifiScanResult.value != null
|
||||
|
||||
Component {
|
||||
id: wiFiScanPageComponent
|
||||
|
||||
WiFiScanPage {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -71,6 +71,7 @@ EVChargerApp 1.0 ScrollableTabPage.qml
|
||||
EVChargerApp 1.0 SecurityPage.qml
|
||||
EVChargerApp 1.0 SelectLogicModeItem.qml
|
||||
EVChargerApp 1.0 SelectPhaseSwitchModeItem.qml
|
||||
EVChargerApp 1.0 SendMessageButton.qml
|
||||
EVChargerApp 1.0 SensorsConfigurationPage.qml
|
||||
EVChargerApp 1.0 SetPriceLimitPage.qml
|
||||
EVChargerApp 1.0 SettingsTabPage.qml
|
||||
|
Reference in New Issue
Block a user