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

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

DriverStrategy BrakingMode CoastingPhase: DoCoast may return null in case a...

DriverStrategy BrakingMode CoastingPhase: DoCoast may return null in case a gearshift occurs - re-iterate
parent f3e06af2
No related branches found
No related tags found
No related merge requests found
......@@ -621,7 +621,13 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
}
switch (Phase) {
case BrakingPhase.Coast:
return DoCoast(absTime, ds, targetVelocity, gradient, currentDistance);
for (var i = 1; i < 3; i++) {
var retVal = DoCoast(absTime, ds, targetVelocity, gradient, currentDistance);
if (retVal != null) {
return retVal;
}
}
throw new VectoException("No valid operating point found");
case BrakingPhase.Brake:
return DoBrake(absTime, ds, targetVelocity, gradient, brakingDistance, currentDistance);
default:
......
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