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

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

Changed reading EcoRoll Attribute for HEV: Will always be EcoRollType None

parent bd849a87
No related branches found
No related tags found
No related merge requests found
......@@ -449,6 +449,13 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
// -------------------------------------------------------------------
internal class JSONADASInputDataV10HEV : JSONADASInputDataV8
{
public JSONADASInputDataV10HEV(JSONVehicleDataV7 vehicle) : base(vehicle) { }
public override EcoRollType EcoRoll => EcoRollType.None;
}
internal class JSONADASInputDataV10BEV : JSONADASInputDataV8
{
public JSONADASInputDataV10BEV(JSONVehicleDataV7 vehicle) : base(vehicle) { }
......
......@@ -113,9 +113,18 @@ namespace TUGraz.VectoCore.InputData.FileIO.JSON
protected override IAdvancedDriverAssistantSystemsEngineering GetADS()
{
return _adasInputData ?? (_adasInputData = (VehicleType == VectoSimulationJobType.BatteryElectricVehicle
? new JSONADASInputDataV10BEV(this)
: base.GetADS()));
if (_adasInputData != null)
return _adasInputData;
switch (VehicleType) {
case VectoSimulationJobType.BatteryElectricVehicle:
return _adasInputData = new JSONADASInputDataV10BEV(this);
case VectoSimulationJobType.ParallelHybridVehicle:
case VectoSimulationJobType.SerialHybridVehicle:
return _adasInputData = new JSONADASInputDataV10HEV(this);
default:
return base.GetADS();
}
}
......
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