From 2822b0a47a7803419594ce22fd600b86a1ac373c Mon Sep 17 00:00:00 2001 From: Markus Quaritsch <markus.quaritsch@tugraz.at> Date: Wed, 2 Jan 2019 15:52:12 +0100 Subject: [PATCH] driver strategy: handle the case of a gearshift response separately as this may occur after an overload, e.g. --- .../SimulationComponent/Impl/DefaultDriverStrategy.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs index fd02cf2bd4..09e438688d 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); -- GitLab