Added reading default network settings
This commit is contained in:
@@ -167,21 +167,30 @@ ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
|
||||
Controls.Button {
|
||||
text: qsTr("Apply")
|
||||
onClicked: {
|
||||
if (!BmsInterface.isPortConnected())
|
||||
return
|
||||
RowLayout {
|
||||
spacing: 20
|
||||
|
||||
var settings = [
|
||||
firstUrlField.text,
|
||||
secondUrlField.text,
|
||||
apnField.text,
|
||||
userField.text,
|
||||
passwordField.text,
|
||||
]
|
||||
Controls.OutlineButton {
|
||||
text: qsTr("Default")
|
||||
onClicked: BmsInterface.commands().getNetDefaultSettings()
|
||||
}
|
||||
|
||||
BmsInterface.commands().setNetSettings(settings)
|
||||
Controls.Button {
|
||||
text: qsTr("Apply")
|
||||
onClicked: {
|
||||
if (!BmsInterface.isPortConnected())
|
||||
return
|
||||
|
||||
var settings = [
|
||||
firstUrlField.text,
|
||||
secondUrlField.text,
|
||||
apnField.text,
|
||||
userField.text,
|
||||
passwordField.text,
|
||||
]
|
||||
|
||||
BmsInterface.commands().setNetSettings(settings)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -212,6 +212,7 @@ ColumnLayout {
|
||||
|
||||
const localTimestamp = (Math.round(date / 1000) - date.getTimezoneOffset() * 60).toString(16)
|
||||
BmsInterface.commands().sendTerminalCmd("setUnixTime " + localTimestamp)
|
||||
Qt.callLater(BmsInterface.emitStatusMessage, qsTr("Time settings applied successfully"), true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user