Implemented writing configuration settings to the board. Added various fixes for configuration fields
This commit is contained in:
@@ -36,13 +36,13 @@ ApplicationWindow {
|
||||
|
||||
Image {
|
||||
source: "qrc:/Icons/cubo-logo.svg"
|
||||
sourceSize.width: pane.minimized ? 80 : 115
|
||||
sourceSize.height: pane.minimized ? 80 : 115
|
||||
sourceSize.width: pane.minimized ? 70 : 115
|
||||
sourceSize.height: pane.minimized ? 70 : 115
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.preferredHeight: pane.minimized ? 75 : 40
|
||||
Layout.preferredHeight: pane.minimized ? 85 : 40
|
||||
}
|
||||
|
||||
ItemDelegate {
|
||||
@@ -255,7 +255,8 @@ ApplicationWindow {
|
||||
}
|
||||
|
||||
Controls.ContentLabel {
|
||||
text: qsTr("V1.3")
|
||||
id: firmwareLabel
|
||||
text: "-"
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
|
||||
@@ -269,7 +270,8 @@ ApplicationWindow {
|
||||
}
|
||||
|
||||
Controls.SubtitleLabel {
|
||||
text: qsTr("9999997")
|
||||
id: serialLabel
|
||||
text: "-"
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
|
||||
@@ -319,6 +321,12 @@ ApplicationWindow {
|
||||
onPortConnectedChanged: {
|
||||
connectionStatusLabel.text = BmsInterface.isPortConnected() ? qsTr("Connected") : qsTr("Disconnected")
|
||||
connectionStatusIndicator.enabled = BmsInterface.isPortConnected()
|
||||
if (BmsInterface.isPortConnected()) {
|
||||
BmsInterface.commands().getBMSconf()
|
||||
} else {
|
||||
serialLabel.text = "-"
|
||||
firmwareLabel.text = "-"
|
||||
}
|
||||
}
|
||||
|
||||
onMessageDialog: {
|
||||
@@ -352,6 +360,20 @@ ApplicationWindow {
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: BmsInterface.bmsConfig()
|
||||
onUpdated: {
|
||||
serialLabel.text = Number(BmsInterface.bmsConfig().getParamDouble("notUsedCurrentThreshold")).toFixed()
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: BmsInterface.commands()
|
||||
onFwVersionReceived: {
|
||||
firmwareLabel.text = major + "." + minor
|
||||
}
|
||||
}
|
||||
|
||||
Screens.ConnectionDialog {
|
||||
id: connectionDialog
|
||||
}
|
||||
@@ -373,7 +395,7 @@ ApplicationWindow {
|
||||
Screens.StatusPopup {
|
||||
id: statusPopup
|
||||
|
||||
property var filteredStatuses: [qsTr("BMS configuration updated")]
|
||||
property var filteredStatuses: []//[qsTr("BMS configuration updated")]
|
||||
property var queue: []
|
||||
|
||||
onClosed: {
|
||||
@@ -400,7 +422,6 @@ ApplicationWindow {
|
||||
Component.onCompleted: {
|
||||
// BmsInterface.bmsConfig().loadParamsXml("://res/config.xml")
|
||||
// BmsInterface.infoConfig().loadParamsXml("://res/info.xml")
|
||||
|
||||
connectionDialog.open()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user