diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs index fd02cf2bd42d33cd595ee6bdfc4da56284d6ab83..09e438688de14dbec96322a26e0f82928b549b0f 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs @@ -743,14 +743,14 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl response = Driver.DrivingActionBrake(absTime, ds, DriverStrategy.BrakeTrigger.NextTargetSpeed, gradient); } }). - Case<ResponseGearShift>(r => { - response = Driver.DrivingActionRoll(absTime, ds, targetVelocity, gradient); - }). Case<ResponseEngineSpeedTooHigh>(r => { response = Driver.DrivingActionBrake(absTime, ds, targetVelocity, gradient, r); }); - // handle the SpeedLimitExceeded Response separately in case it occurs in one of the requests in the second try + // handle the SpeedLimitExceeded Response and Gearshift Response separately in case it occurs in one of the requests in the second try response.Switch(). + Case<ResponseGearShift>(r => { + response = Driver.DrivingActionRoll(absTime, ds, targetVelocity, gradient); + }). Case<ResponseSpeedLimitExceeded>(() => { response = Driver.DrivingActionBrake(absTime, ds, DataBus.VehicleSpeed, gradient);