Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 7394a7e2 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

Merge branch 'develop' of...

parents e875ea4c cf10bec7
No related branches found
No related tags found
No related merge requests found
...@@ -453,8 +453,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -453,8 +453,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
return best.Key; return best.Key;
} }
var retVal = candidates.Where(x => x.Value < VoltageLevels.MaxSpeed).MaxBy(x => x.Value).Key; if (candidates.Any(x => x.Value < VoltageLevels.MaxSpeed))
return retVal; return candidates.Where(x => x.Value < VoltageLevels.MaxSpeed).MaxBy(x => x.Value).Key;
else {
return candidates.MaxBy(x => x.Value).Key;
}
} }
protected virtual GearshiftPosition CheckEarlyDownshift(Second absTime, Second dt, NewtonMeter outTorque, protected virtual GearshiftPosition CheckEarlyDownshift(Second absTime, Second dt, NewtonMeter outTorque,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment