diff --git a/evcharger-app/CMakeLists.txt b/evcharger-app/CMakeLists.txt
index 2559e61..838e8e8 100644
--- a/evcharger-app/CMakeLists.txt
+++ b/evcharger-app/CMakeLists.txt
@@ -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
diff --git a/evcharger-app/i18n/qml_de.ts b/evcharger-app/i18n/qml_de.ts
index 16b55a3..2891a21 100644
--- a/evcharger-app/i18n/qml_de.ts
+++ b/evcharger-app/i18n/qml_de.ts
@@ -1423,27 +1423,27 @@
Start
-
+
Abort
Abbrechen
-
+
Switch partition
Partition tauschen
-
+
Update status:
Update status:
-
+
Update progress:
Update Fortschritt:
-
+
Update message:
Update Meldung:
@@ -1930,39 +1930,54 @@
+ Reset nvs key...
+
+
+
+
Open app(s)...
-
+
Enter update url...
-
+
Update url:
-
+
Select update release...
-
+
Update release
-
+
Are you sure?
Sind Sie sicher?
-
+
Do you really want to reboot selected devices?
+
+
+ Please input nvs key to be reset
+
+
+
+
+ Nvs key
+
+
MqttPage
@@ -2924,27 +2939,46 @@
Status:
-
- (%0) Wi-Fi Scan
- (%0) Wi-Fi Scan
+
+ Scan-Status:
+
-
+
+ Scan-Age:
+
+
+
+
+ Trigger scan
+
+
+
+
+ (%0) Scan Result
+
+
+
+ (%0) Wi-Fi Scan
+ (%0) Wi-Fi Scan
+
+
+
(%0) Wi-Fi Errors
(%0) WLAN Probleme
-
+
Min RSSI
Min RSSI
-
+
Pmf capable
Pmf fähig
-
+
Pmf required
Pmf erforderlich
diff --git a/evcharger-app/qml/FirmwarePage.qml b/evcharger-app/qml/FirmwarePage.qml
index 7a5245e..476dca2 100644
--- a/evcharger-app/qml/FirmwarePage.qml
+++ b/evcharger-app/qml/FirmwarePage.qml
@@ -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 {
diff --git a/evcharger-app/qml/SendMessageButton.qml b/evcharger-app/qml/SendMessageButton.qml
new file mode 100644
index 0000000..8a3027d
--- /dev/null
+++ b/evcharger-app/qml/SendMessageButton.qml
@@ -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
+ }
+}
diff --git a/evcharger-app/qml/WiFiPage.qml b/evcharger-app/qml/WiFiPage.qml
index 513f91a..c3d4e7e 100644
--- a/evcharger-app/qml/WiFiPage.qml
+++ b/evcharger-app/qml/WiFiPage.qml
@@ -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 {
+ }
}
}
}
diff --git a/evcharger-app/qml/qmldir b/evcharger-app/qml/qmldir
index 122421b..22e767f 100644
--- a/evcharger-app/qml/qmldir
+++ b/evcharger-app/qml/qmldir
@@ -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