Code development platform for open source projects from the European Union institutions

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

PEVShiftstrategy: check first for null

parent 8e007b85
No related branches found
No related tags found
No related merge requests found
......@@ -50,15 +50,14 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
public PEVAMTShiftStrategy(IVehicleContainer dataBus)
{
GearboxModelData = dataBus.RunData.GearboxData;
GearshiftParams = dataBus.RunData.GearshiftParameters;
GearList = GearboxModelData.GearList;
MaxStartGear = GearList.Reverse().First();
var runData = dataBus.RunData;
if (runData.VehicleData == null) {
return;
}
GearboxModelData = dataBus.RunData.GearboxData;
GearshiftParams = dataBus.RunData.GearshiftParameters;
GearList = GearboxModelData.GearList;
MaxStartGear = GearList.Reverse().First();
PowerMap = dataBus.RunData.ElectricMachinesData
.FirstOrDefault(x => x.Item1 == PowertrainPosition.BatteryElectricE2)?.Item2.EfficiencyMap;
......
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