Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 90410a92 authored by Michael KRISPER's avatar Michael KRISPER
Browse files

VehicleForm: enabling/disabling retarder dropdowns based on VehicleArchitecture (E3)

parent ae60e72a
Branches
Tags
No related merge requests found
......@@ -526,6 +526,11 @@ Public Class VehicleForm
Private Sub UpdateForm(vehType As VectoSimulationJobType)
VehicleType = vehType
gbVehicleIdlingSpeed.Enabled = true
gbTankSystem.Enabled = true
gbAngledrive.Enabled = true
Select Case vehType
Case VectoSimulationJobType.ConventionalVehicle
lblTitle.Text = "Conventional Vehicle"
......@@ -547,8 +552,6 @@ Public Class VehicleForm
case VectoSimulationJobType.SerialHybridVehicle
lblTitle.Text = "Serial Hybrid Vehicle"
cbEmPos.DataSource = EnumHelper.GetKeyValuePairs(of PowertrainPosition)(function(t) t.GetLabel, function(x) x.IsSerialHybrid())
tpPowertrain.Enabled = true
CbRtType.DataSource = EnumHelper.GetKeyValuePairs(Of RetarderType)(Function(t) t.GetLabel(), Function(t) t.IsOneOf(RetarderType.None, RetarderType.AxlegearInputRetarder))
tpTorqueLimits.Enabled = False
cbEngineStopStart.Checked = False
......@@ -559,7 +562,10 @@ Public Class VehicleForm
tpGensetComponents.Visible = True
Case VectoSimulationJobType.BatteryElectricVehicle
lblTitle.Text = "Battery Electric Vehicle"
tpPowertrain.Enabled = False
gbVehicleIdlingSpeed.Enabled = false
gbTankSystem.Enabled = false
gbAngledrive.Enabled = False
CbRtType.DataSource = EnumHelper.GetKeyValuePairs(Of RetarderType)(Function(t) t.GetLabel(), Function(t) t.IsOneOf(RetarderType.None, RetarderType.AxlegearInputRetarder))
......@@ -634,11 +640,11 @@ Public Class VehicleForm
veh.Axles.Add(a0)
Next
If (VehicleType = VectoSimulationJobType.ConventionalVehicle OrElse VehicleType = VectoSimulationJobType.ParallelHybridVehicle OrElse VehicleType = VectoSimulationJobType.SerialHybridVehicle) Then
veh.RetarderType = CType(CbRtType.SelectedValue, RetarderType)
veh.RetarderRatio = TbRtRatio.Text.ToDouble(0)
veh.RetarderLossMapFile.Init(GetPath(file), TbRtPath.Text)
If (VehicleType = VectoSimulationJobType.ConventionalVehicle OrElse VehicleType = VectoSimulationJobType.ParallelHybridVehicle OrElse VehicleType = VectoSimulationJobType.SerialHybridVehicle) Then
veh.VehicleidlingSpeed = _tbVehIdlingSpeed.Text.ToDouble(0).RPMtoRad()
veh.AngledriveType = CType(cbAngledriveType.SelectedValue, AngledriveType)
......@@ -809,14 +815,15 @@ Public Class VehicleForm
'Rt Type Change
Private Sub CbRtType_SelectedIndexChanged(sender As Object, e As EventArgs) _
Handles CbRtType.SelectedIndexChanged
Select Case CbRtType.SelectedIndex
Case 1 'Primary
Select Case CType(CbRtType.SelectedValue, RetarderType)
Case RetarderType.TransmissionInputRetarder 'Primary
LbRtRatio.Text = "Ratio to engine speed"
PnRt.Enabled = True
Case 2 'Secondary
Case RetarderType.TransmissionOutputRetarder 'Secondary
LbRtRatio.Text = "Ratio to cardan shaft speed"
TbRtPath.Enabled = True
BtRtBrowse.Enabled = True
PnRt.Enabled = True
case RetarderType.AxlegearInputRetarder
LbRtRatio.Text = "Ratio to axle shaft speed"
PnRt.Enabled = True
Case Else '0 None
LbRtRatio.Text = "Ratio"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment