diff --git a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATShiftStrategy.cs b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATShiftStrategy.cs index 7d2f64e0de6e6b511db0b0a8a1f1f86bf267409b..92af6aeb2f46cb1d49307533f9de0668bbb3fc1c 100644 --- a/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATShiftStrategy.cs +++ b/VectoCore/VectoCore/Models/SimulationComponent/Impl/ATShiftStrategy.cs @@ -177,7 +177,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl return true; } // Emergency Upshift: if higher than engine rated speed - if (inAngularVelocity.IsGreaterOrEqual(ModelData.Gears[gear].MaxSpeed ?? DataBus.EngineRatedSpeed)) { + if (inAngularVelocity.IsGreaterOrEqual(VectoMath.Min(ModelData.Gears[gear].MaxSpeed, DataBus.EngineRatedSpeed))) { // check if upshift is possible if (!ModelData.Gears.ContainsKey(gear + 1)) { return false;