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 c3379078 authored by Michael KRISPER's avatar Michael KRISPER
Browse files

corrected bug in driver for test "Coach_DriverStrategy_Decelerate_60_20_uphill_25"

parent 2d2fadc8
Branches
Tags
No related merge requests found
...@@ -562,10 +562,15 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl ...@@ -562,10 +562,15 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
}, },
evaluateFunction: evaluateFunction:
acc => { acc => {
// calculate new time interval only when vehiclespeed and acceleration are != 0
// else: use same timeinterval as before.
if (!(acc.IsEqual(0) && DataBus.VehicleSpeed.IsEqual(0))) {
var tmp = ComputeTimeInterval(acc, ds); var tmp = ComputeTimeInterval(acc, ds);
retVal.Acceleration = tmp.Acceleration;
retVal.SimulationInterval = tmp.SimulationInterval; retVal.SimulationInterval = tmp.SimulationInterval;
retVal.SimulationDistance = tmp.SimulationDistance; retVal.SimulationDistance = tmp.SimulationDistance;
return NextComponent.Request(absTime, tmp.SimulationInterval, acc, gradient, true); }
return NextComponent.Request(absTime, retVal.SimulationInterval, acc, gradient, true);
}, },
criterion: response => { criterion: response => {
if (response is ResponseEngineSpeedTooLow) { if (response is ResponseEngineSpeedTooLow) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment