Implemented functionality to control outputs for BMS
This commit is contained in:
@@ -393,7 +393,8 @@ RowLayout {
|
||||
}
|
||||
|
||||
Controls.CheckBox {
|
||||
text: qsTr("Use for storage management")
|
||||
id: chargeBatteryOutputCheckBox
|
||||
text: qsTr("Use to control charger")
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: outputSettingsFrame.outputNumberSize
|
||||
}
|
||||
@@ -417,7 +418,8 @@ RowLayout {
|
||||
}
|
||||
|
||||
Controls.CheckBox {
|
||||
text: qsTr("Normally closed")
|
||||
id: brushOrShuntOutputCheckBox
|
||||
text: qsTr("Active")
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: outputSettingsFrame.outputNumberSize
|
||||
}
|
||||
@@ -426,20 +428,48 @@ RowLayout {
|
||||
Layout.columnSpan: 2
|
||||
}
|
||||
|
||||
Controls.RadioButton {
|
||||
id: brushControlRadioButton
|
||||
text: qsTr("Brush control")
|
||||
Layout.fillWidth: true
|
||||
Layout.maximumWidth: (parent.width - parent.columnSpacing) / 2
|
||||
}
|
||||
|
||||
Controls.RadioButton {
|
||||
id: shuntChargingContactorRadioButton
|
||||
text: qsTr("Shunt charging contactor")
|
||||
Layout.fillWidth: true
|
||||
Layout.maximumWidth: (parent.width - parent.columnSpacing) / 2
|
||||
}
|
||||
|
||||
Controls.SubtitleLabel {
|
||||
text: qsTr("Change in value during SOC")
|
||||
text: qsTr("SOC threshold, %")
|
||||
maximumLineCount: 2
|
||||
wrapMode: Text.WordWrap
|
||||
Layout.fillWidth: true
|
||||
Layout.maximumWidth: (parent.width - parent.columnSpacing) / 2
|
||||
}
|
||||
|
||||
Controls.SubtitleLabel {
|
||||
text: qsTr("Delay, s")
|
||||
maximumLineCount: 2
|
||||
wrapMode: Text.WordWrap
|
||||
Layout.fillWidth: true
|
||||
Layout.maximumWidth: (parent.width - parent.columnSpacing) / 2
|
||||
Layout.columnSpan: 2
|
||||
}
|
||||
|
||||
Controls.TextField {
|
||||
id: changeValueSocField
|
||||
id: brushUsageSocThresholdField
|
||||
validator: IntValidator { bottom: 0; top: 100 }
|
||||
Layout.fillWidth: true
|
||||
Layout.maximumWidth: (parent.width - parent.columnSpacing) / 2
|
||||
}
|
||||
|
||||
Controls.TextField {
|
||||
id: shuntChargingContactorDelayField
|
||||
validator: IntValidator { bottom: 0; top: 65535 }
|
||||
Layout.fillWidth: true
|
||||
Layout.maximumWidth: (parent.width - parent.columnSpacing) / 2
|
||||
Layout.columnSpan: 2
|
||||
}
|
||||
|
||||
Controls.LineSeparator {
|
||||
@@ -457,6 +487,8 @@ RowLayout {
|
||||
}
|
||||
|
||||
Controls.CheckBox {
|
||||
id: coolingOutputCheckBox
|
||||
text: qsTr("Cooling activation")
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: outputSettingsFrame.outputNumberSize
|
||||
}
|
||||
@@ -478,13 +510,15 @@ RowLayout {
|
||||
}
|
||||
|
||||
Controls.TextField {
|
||||
id: closesBelowTemperatureThirdField
|
||||
id: coolingStartThresholdField
|
||||
validator: IntValidator { bottom: -32768; top: 32768 }
|
||||
Layout.fillWidth: true
|
||||
Layout.maximumWidth: (parent.width - parent.columnSpacing) / 2
|
||||
}
|
||||
|
||||
Controls.TextField {
|
||||
id: opensGreaterTemperatureThirdField
|
||||
id: coolingStopThresholdField
|
||||
validator: IntValidator { bottom: -32768; top: 32768 }
|
||||
Layout.fillWidth: true
|
||||
Layout.maximumWidth: (parent.width - parent.columnSpacing) / 2
|
||||
}
|
||||
@@ -504,6 +538,8 @@ RowLayout {
|
||||
}
|
||||
|
||||
Controls.CheckBox {
|
||||
id: heatingOutputCheckBox
|
||||
text: qsTr("Heating activation")
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: outputSettingsFrame.outputNumberSize
|
||||
}
|
||||
@@ -525,13 +561,15 @@ RowLayout {
|
||||
}
|
||||
|
||||
Controls.TextField {
|
||||
id: closesBelowTemperatureFourthField
|
||||
id: heatingStartThresholdField
|
||||
validator: IntValidator { bottom: -32768; top: 32768 }
|
||||
Layout.fillWidth: true
|
||||
Layout.maximumWidth: (parent.width - parent.columnSpacing) / 2
|
||||
}
|
||||
|
||||
Controls.TextField {
|
||||
id: opensGreaterTemperatureFourthField
|
||||
id: heatingStopThresholdField
|
||||
validator: IntValidator { bottom: -32768; top: 32768 }
|
||||
Layout.fillWidth: true
|
||||
Layout.maximumWidth: (parent.width - parent.columnSpacing) / 2
|
||||
}
|
||||
@@ -756,6 +794,21 @@ RowLayout {
|
||||
BmsInterface.bmsConfig().setParamValue("cellBalanceUpdateInterval", parseInt(balancingCellIntervalField.text))
|
||||
|
||||
BmsInterface.bmsConfig().setParamValue("shuntLCFactor", parseFloat(zeroSensorValueField.text))
|
||||
|
||||
BmsInterface.bmsConfig().setParamValue("chargeBatteryOutputChecked", chargeBatteryOutputCheckBox.checked)
|
||||
|
||||
BmsInterface.bmsConfig().setParamValue("brushOrShuntOutputChecked", brushOrShuntOutputCheckBox.checked)
|
||||
BmsInterface.bmsConfig().setParamValue("brushOrShuntMode", shuntChargingContactorRadioButton.checked)
|
||||
BmsInterface.bmsConfig().setParamValue("brushUsageSocThreshold", parseInt(brushUsageSocThresholdField.text))
|
||||
BmsInterface.bmsConfig().setParamValue("shuntChargingContactorDelay", parseInt(shuntChargingContactorDelayField.text))
|
||||
|
||||
BmsInterface.bmsConfig().setParamValue("coolingOutputChecked", coolingOutputCheckBox.checked)
|
||||
BmsInterface.bmsConfig().setParamValue("coolingStartThreshold", parseInt(coolingStartThresholdField.text))
|
||||
BmsInterface.bmsConfig().setParamValue("coolingStopThreshold", parseInt(coolingStopThresholdField.text))
|
||||
|
||||
BmsInterface.bmsConfig().setParamValue("heatingOutputChecked", heatingOutputCheckBox.checked)
|
||||
BmsInterface.bmsConfig().setParamValue("heatingStartThreshold", parseInt(heatingStartThresholdField.text))
|
||||
BmsInterface.bmsConfig().setParamValue("heatingStopThreshold", parseInt(heatingStopThresholdField.text))
|
||||
}
|
||||
|
||||
Connections {
|
||||
@@ -783,6 +836,22 @@ RowLayout {
|
||||
balancingCellIntervalField.text = BmsInterface.bmsConfig().getParamInt("cellBalanceUpdateInterval")
|
||||
|
||||
zeroSensorValueField.text = MathHelper.roundDouble(BmsInterface.bmsConfig().getParamDouble("shuntLCFactor"))
|
||||
|
||||
chargeBatteryOutputCheckBox.checked = BmsInterface.bmsConfig().getParamBool("chargeBatteryOutputChecked")
|
||||
|
||||
brushOrShuntOutputCheckBox.checked = BmsInterface.bmsConfig().getParamBool("brushOrShuntOutputChecked")
|
||||
brushControlRadioButton.checked = !BmsInterface.bmsConfig().getParamBool("brushOrShuntMode")
|
||||
shuntChargingContactorRadioButton.checked = BmsInterface.bmsConfig().getParamBool("brushOrShuntMode")
|
||||
brushUsageSocThresholdField.text = BmsInterface.bmsConfig().getParamInt("brushUsageSocThreshold")
|
||||
shuntChargingContactorDelayField.text = BmsInterface.bmsConfig().getParamInt("shuntChargingContactorDelay")
|
||||
|
||||
coolingOutputCheckBox.checked = BmsInterface.bmsConfig().getParamBool("coolingOutputChecked")
|
||||
coolingStartThresholdField.text = BmsInterface.bmsConfig().getParamInt("coolingStartThreshold")
|
||||
coolingStopThresholdField.text = BmsInterface.bmsConfig().getParamInt("coolingStopThreshold")
|
||||
|
||||
heatingOutputCheckBox.checked = BmsInterface.bmsConfig().getParamBool("heatingOutputChecked")
|
||||
heatingStartThresholdField.text = BmsInterface.bmsConfig().getParamInt("heatingStartThreshold")
|
||||
heatingStopThresholdField.text = BmsInterface.bmsConfig().getParamInt("heatingStopThreshold")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user