Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 83ac8234 authored by Michael KRISPER's avatar Michael KRISPER
Browse files

AT ShiftStrategy: Check if upshift is possible (even in emergency upshift)

parent 2150fad5
No related branches found
No related tags found
No related merge requests found
......@@ -126,7 +126,7 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
}
// Emergency Upshift: if higher than engine rated speed
if (inAngularVelocity.IsGreaterOrEqual(DataBus.EngineRatedSpeed)) {
if (inAngularVelocity.IsGreaterOrEqual(DataBus.EngineRatedSpeed) && Data.Gears.ContainsKey(gear + 1)) {
Log.Debug("engine speed would be above rated speed - shift up");
Upshift(absTime, gear);
return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment