Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 3f01f528 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

battery form: save/load new input parameter

parent 56d651b9
No related branches found
No related tags found
No related merge requests found
......@@ -195,6 +195,9 @@ Public Class BatteryForm
tbMaxCurrentMap.Text = GetRelativePath(battery.MaxCurrentMap.Source, basePath)
tbSoCCurve.Text = GetRelativePath(battery.VoltageCurve.Source, basePath)
tbRiCurve.Text = GetRelativePath(battery.InternalResistanceCurve.Source, basePath)
tbTestingTempB.Text = battery.TestingTemperature.AsDegCelsius.ToGUIFormat()
cbJunctionBoxIncl.Checked = battery.JunctionboxIncluded
cbConnectorsIncluded.Checked = battery.ConnectorsSubsystemsIncluded
tbSuperCapCapacity.Text = String.Empty
tbSuperCapMaxV.Text = string.Empty
......@@ -219,6 +222,7 @@ Public Class BatteryForm
tbSuperCapMaxV.Text = superCap.MaxVoltage.ToGUIFormat()
tbSuperCapMinV.Text= superCap.MinVoltage.ToGUIFormat()
tbSuperCapRi.Text= superCap.InternalResistance.ToGUIFormat()
tbTestingTempC.Text = superCap.TestingTemperature.AsDegCelsius.ToGUIFormat()
tbSuperCapMaxCurrentCharge.Text = superCap.MaxCurrentCharge.ToGuiFormat()
tbSuperCapMaxCurrentDischarge.Text = superCap.MaxCurrentDischarge.ToGuiFormat()
......@@ -302,6 +306,7 @@ Public Class BatteryForm
superCap.MaxChgCurrent = tbSuperCapMaxCurrentCharge.Text.ToDouble(0)
superCap.MaxDischgCurrent = tbSuperCapMaxCurrentDischarge.Text.ToDouble(0)
superCap.TestingTemperature = tbTestingTempC.Text.ToDouble(20).DegCelsiusToKelvin()
Return superCap
End Function
......@@ -321,6 +326,9 @@ Public Class BatteryForm
battery.BatMaxSoc = tbSoCMax.Text.ToDouble(0)
battery.PathMaxCurrentCurve = tbMaxCurrentMap.Text
battery.JunctionboxIncluded = cbJunctionBoxIncl.Checked
battery.ConnectorsSubsystemsIncluded = cbConnectorsIncluded.Checked
battery.TestingTemperature = tbTestingTempB.Text.ToDouble(20).DegCelsiusToKelvin()
Return battery
End Function
Private Sub tbCapacity_Leave(sender As Object, e As System.EventArgs) Handles tbCapacity.Leave
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment