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

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

fix: waiting time has to be from previous state

parent dd0a0156
No related branches found
No related tags found
No related merge requests found
......@@ -179,11 +179,11 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
private Second GetStopTimeInterval()
{
if (!Left.PTOActive || IdleController == null) {
if ((Left.StoppingTime - CurrentState.WaitTime).IsGreater(2 * Constants.SimulationSettings.TargetTimeInterval,
if ((Left.StoppingTime - PreviousState.WaitTime).IsGreater(2 * Constants.SimulationSettings.TargetTimeInterval,
0.1 * Constants.SimulationSettings.TargetTimeInterval)) {
return 2 * Constants.SimulationSettings.TargetTimeInterval;
}
return Left.StoppingTime - CurrentState.WaitTime;
return Left.StoppingTime - PreviousState.WaitTime;
}
if (Left.StoppingTime.IsGreater(6 * Constants.SimulationSettings.TargetTimeInterval)) {
// 7 phases
......@@ -538,4 +538,4 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
CycleIntervalIterator.Dispose();
}
}
}
\ No newline at end of file
}
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