diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs index 677e5c904cc46522b6b8170ce9fc3d12adff64a2..15ddb067782472d3050d3e95bbc1dc493308c219 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Strategies/HybridStrategy.cs @@ -45,14 +45,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Strategies protected override IResponse RequestDryRun(Second absTime, Second dt, NewtonMeter outTorque, PerSecond outAngularVelocity, GearshiftPosition nextGear, HybridStrategyResponse cfg) { - if (DataBus.VehicleInfo.VehicleStopped) { - TestPowertrain.Gearbox.Gear = Controller.ShiftStrategy.NextGear; - } - else if (PreviousState.GearboxEngaged) { - TestPowertrain.Gearbox.Gear = DataBus.GearboxInfo.Gear; - } else { - TestPowertrain.Gearbox.Gear = Controller.ShiftStrategy.NextGear; - } + TestPowertrain.Gearbox.Gear = (DataBus.VehicleInfo.VehicleStopped) + ? NextGear + : (PreviousState.GearboxEngaged) + ? CurrentGear + : NextGear; TestPowertrain.Gearbox.Disengaged = !nextGear.Engaged; TestPowertrain.Gearbox.DisengageGearbox = !nextGear.Engaged;