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/SecurityPage.qml
|
||||||
qml/SelectLogicModeItem.qml
|
qml/SelectLogicModeItem.qml
|
||||||
qml/SelectPhaseSwitchModeItem.qml
|
qml/SelectPhaseSwitchModeItem.qml
|
||||||
|
qml/SendMessageButton.qml
|
||||||
qml/SensorsConfigurationPage.qml
|
qml/SensorsConfigurationPage.qml
|
||||||
qml/SetPriceLimitPage.qml
|
qml/SetPriceLimitPage.qml
|
||||||
qml/SettingsTabPage.qml
|
qml/SettingsTabPage.qml
|
||||||
|
@@ -1423,27 +1423,27 @@
|
|||||||
<translation>Start</translation>
|
<translation>Start</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/FirmwarePage.qml" line="121"/>
|
<location filename="../qml/FirmwarePage.qml" line="114"/>
|
||||||
<source>Abort</source>
|
<source>Abort</source>
|
||||||
<translation>Abbrechen</translation>
|
<translation>Abbrechen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/FirmwarePage.qml" line="146"/>
|
<location filename="../qml/FirmwarePage.qml" line="120"/>
|
||||||
<source>Switch partition</source>
|
<source>Switch partition</source>
|
||||||
<translation>Partition tauschen</translation>
|
<translation>Partition tauschen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/FirmwarePage.qml" line="167"/>
|
<location filename="../qml/FirmwarePage.qml" line="129"/>
|
||||||
<source>Update status:</source>
|
<source>Update status:</source>
|
||||||
<translation>Update status:</translation>
|
<translation>Update status:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/FirmwarePage.qml" line="195"/>
|
<location filename="../qml/FirmwarePage.qml" line="157"/>
|
||||||
<source>Update progress:</source>
|
<source>Update progress:</source>
|
||||||
<translation>Update Fortschritt:</translation>
|
<translation>Update Fortschritt:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/FirmwarePage.qml" line="226"/>
|
<location filename="../qml/FirmwarePage.qml" line="188"/>
|
||||||
<source>Update message:</source>
|
<source>Update message:</source>
|
||||||
<translation>Update Meldung:</translation>
|
<translation>Update Meldung:</translation>
|
||||||
</message>
|
</message>
|
||||||
@@ -1930,39 +1930,54 @@
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../flotten-updater/mainwindow.cpp" line="120"/>
|
<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>
|
<source>Open app(s)...</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../flotten-updater/mainwindow.cpp" line="124"/>
|
<location filename="../../flotten-updater/mainwindow.cpp" line="125"/>
|
||||||
<source>Enter update url...</source>
|
<source>Enter update url...</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../flotten-updater/mainwindow.cpp" line="124"/>
|
<location filename="../../flotten-updater/mainwindow.cpp" line="125"/>
|
||||||
<source>Update url:</source>
|
<source>Update url:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../flotten-updater/mainwindow.cpp" line="140"/>
|
<location filename="../../flotten-updater/mainwindow.cpp" line="141"/>
|
||||||
<source>Select update release...</source>
|
<source>Select update release...</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../flotten-updater/mainwindow.cpp" line="142"/>
|
<location filename="../../flotten-updater/mainwindow.cpp" line="143"/>
|
||||||
<source>Update release</source>
|
<source>Update release</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../flotten-updater/mainwindow.cpp" line="159"/>
|
<location filename="../../flotten-updater/mainwindow.cpp" line="160"/>
|
||||||
<source>Are you sure?</source>
|
<source>Are you sure?</source>
|
||||||
<translation type="unfinished">Sind Sie sicher?</translation>
|
<translation type="unfinished">Sind Sie sicher?</translation>
|
||||||
</message>
|
</message>
|
||||||
<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>
|
<source>Do you really want to reboot selected devices?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</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>
|
||||||
<context>
|
<context>
|
||||||
<name>MqttPage</name>
|
<name>MqttPage</name>
|
||||||
@@ -2924,27 +2939,46 @@
|
|||||||
<translation>Status:</translation>
|
<translation>Status:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/WiFiPage.qml" line="58"/>
|
<location filename="../qml/WiFiPage.qml" line="51"/>
|
||||||
<source>(%0) Wi-Fi Scan</source>
|
<source>Scan-Status:</source>
|
||||||
<translation>(%0) Wi-Fi Scan</translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<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>
|
<source>(%0) Wi-Fi Errors</source>
|
||||||
<translation>(%0) WLAN Probleme</translation>
|
<translation>(%0) WLAN Probleme</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/WiFiPage.qml" line="90"/>
|
<location filename="../qml/WiFiPage.qml" line="139"/>
|
||||||
<source>Min RSSI</source>
|
<source>Min RSSI</source>
|
||||||
<translation>Min RSSI</translation>
|
<translation>Min RSSI</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/WiFiPage.qml" line="101"/>
|
<location filename="../qml/WiFiPage.qml" line="150"/>
|
||||||
<source>Pmf capable</source>
|
<source>Pmf capable</source>
|
||||||
<translation>Pmf fähig</translation>
|
<translation>Pmf fähig</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../qml/WiFiPage.qml" line="106"/>
|
<location filename="../qml/WiFiPage.qml" line="155"/>
|
||||||
<source>Pmf required</source>
|
<source>Pmf required</source>
|
||||||
<translation>Pmf erforderlich</translation>
|
<translation>Pmf erforderlich</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@@ -109,54 +109,16 @@ NavigationPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
SendMessageButton {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
text: qsTr("Abort")
|
||||||
SendMessageHelper {
|
messageType: "abortFwUpdate"
|
||||||
id: abortFirmwareUpdate
|
|
||||||
deviceConnection: theDeviceConnection
|
|
||||||
}
|
|
||||||
|
|
||||||
Button {
|
|
||||||
text: qsTr("Abort")
|
|
||||||
|
|
||||||
onClicked: abortFirmwareUpdate.sendMessage({
|
|
||||||
type: "abortFwUpdate"
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
BusyIndicator {
|
|
||||||
visible: abortFirmwareUpdate.pending
|
|
||||||
}
|
|
||||||
|
|
||||||
RequestStatusText {
|
|
||||||
request: abortFirmwareUpdate
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
SendMessageButton {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
text: qsTr("Switch partition")
|
||||||
SendMessageHelper {
|
messageType: "switchAppPartition"
|
||||||
id: switchAppPartition
|
|
||||||
deviceConnection: theDeviceConnection
|
|
||||||
}
|
|
||||||
|
|
||||||
Button {
|
|
||||||
text: qsTr("Switch partition")
|
|
||||||
|
|
||||||
onClicked: switchAppPartition.sendMessage({
|
|
||||||
type: "switchAppPartition"
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
BusyIndicator {
|
|
||||||
visible: switchAppPartition.pending
|
|
||||||
}
|
|
||||||
|
|
||||||
RequestStatusText {
|
|
||||||
request: switchAppPartition
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GridLayout {
|
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 {
|
Text {
|
||||||
ApiKeyValueHelper {
|
text: qsTr("Scan-Status:")
|
||||||
id: wifiScanResult
|
|
||||||
deviceConnection: theDeviceConnection
|
|
||||||
apiKey: "scan"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
text: qsTr("(%0) Wi-Fi Scan").arg(wifiScanResult.value == null ? 0 : wifiScanResult.value.length)
|
Text {
|
||||||
onClicked: stackView.push(wiFiScanPageComponent, {wifiScanResult} )
|
Layout.fillWidth: true
|
||||||
enabled: wifiScanResult.value != null
|
|
||||||
|
|
||||||
Component {
|
ApiKeyValueHelper {
|
||||||
id: wiFiScanPageComponent
|
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 SecurityPage.qml
|
||||||
EVChargerApp 1.0 SelectLogicModeItem.qml
|
EVChargerApp 1.0 SelectLogicModeItem.qml
|
||||||
EVChargerApp 1.0 SelectPhaseSwitchModeItem.qml
|
EVChargerApp 1.0 SelectPhaseSwitchModeItem.qml
|
||||||
|
EVChargerApp 1.0 SendMessageButton.qml
|
||||||
EVChargerApp 1.0 SensorsConfigurationPage.qml
|
EVChargerApp 1.0 SensorsConfigurationPage.qml
|
||||||
EVChargerApp 1.0 SetPriceLimitPage.qml
|
EVChargerApp 1.0 SetPriceLimitPage.qml
|
||||||
EVChargerApp 1.0 SettingsTabPage.qml
|
EVChargerApp 1.0 SettingsTabPage.qml
|
||||||
|
Reference in New Issue
Block a user