diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs index 582e53a7675a5398b618b46590bbe41601ee8dee..99dbc193ff197f1da00916a2fc3ada8b3556264a 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/DefaultDriverStrategy.cs @@ -658,7 +658,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl DataBus.BrakePower = 0.SI<Watt>(); response = Driver.DrivingActionBrake(absTime, ds, DriverStrategy.BrakeTrigger.NextTargetSpeed, gradient, targetDistance: targetDistance); - }); + response.Switch().Case<ResponseOverload>( + () => { + Log.Info("Brake -> Geearshift -> Overload -> trying roll action (no gear engaged)"); + response = Driver.DrivingActionRoll(absTime, ds, DriverStrategy.BrakeTrigger.NextTargetSpeed, gradient); + }); + }); return response; } diff --git a/VectoCore/VectoCoreTest/Models/Declaration/ShiftPolygonTest.cs b/VectoCore/VectoCoreTest/Models/Declaration/ShiftPolygonTest.cs index a6584ee0d8e9b428baa8e3bbf62eb3f17f98a66e..87bcaa777933f0b6e1635128c31e6223cea4ae73 100644 --- a/VectoCore/VectoCoreTest/Models/Declaration/ShiftPolygonTest.cs +++ b/VectoCore/VectoCoreTest/Models/Declaration/ShiftPolygonTest.cs @@ -54,6 +54,8 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration [TestFixture] public class ShiftPolygonTest { + + [OneTimeSetUp] public void RunBeforeAnyTests() { Directory.SetCurrentDirectory(TestContext.CurrentContext.TestDirectory);