Added some UI fixes

This commit is contained in:
Yury Shuvakin
2022-08-29 02:57:42 +03:00
parent 86b73ca662
commit 1fc06361f8
8 changed files with 164 additions and 153 deletions

View File

@@ -692,32 +692,36 @@ RowLayout {
Controls.OutlineButton {
text: qsTr("Read default settings")
Layout.fillWidth: true
onClicked: BmsInterface.commands().getBMSconfDefault()
onClicked: if (BmsInterface.isPortConnected()) {
BmsInterface.commands().getBMSconfDefault()
}
}
Controls.OutlineButton {
text: qsTr("Read current settings from BMS")
Layout.fillWidth: true
onClicked: BmsInterface.commands().getBMSconf()
onClicked: if (BmsInterface.isPortConnected()) {
BmsInterface.commands().getBMSconf()
}
}
Controls.OutlineButton {
text: qsTr("Write current values to BMS")
Layout.fillWidth: true
onClicked: {
writeValuesToConfig()
BmsInterface.commands().setBMSconf()
}
onClicked: if (BmsInterface.isPortConnected()) {
writeValuesToConfig()
BmsInterface.commands().setBMSconf()
}
}
Controls.Button {
text: qsTr("Write to non-volatile memory of BMS")
Layout.fillWidth: true
onClicked: {
needWait(true, qsTr("The settings are written to non-volatile memory.\nWait, please."))
writeValuesToConfig()
BmsInterface.commands().storeBMSConfig()
}
onClicked: if (BmsInterface.isPortConnected()) {
needWait(true, qsTr("The settings are written to non-volatile memory.\nWait, please."))
writeValuesToConfig()
BmsInterface.commands().storeBMSConfig()
}
}
Layout.fillWidth: true