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 e943c0aa authored by Harald Martini's avatar Harald Martini
Browse files

use <= operator when checking if we are below target speed

parent f95bc74e
No related branches found
No related tags found
No related merge requests found
......@@ -1190,7 +1190,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
Second absTime, Meter ds, MeterPerSecond targetVelocity, Radian gradient,
bool prohibitOverspeed = false)
{
if (DataBus.VehicleInfo.VehicleSpeed.IsSmaller(DriverStrategy.BrakeTrigger.NextTargetSpeed, Constants.SimulationSettings.BrakeTriggerSpeedTolerance)
//If we have reached the target speed exactly we stop breaking
//if (DataBus.VehicleInfo.VehicleSpeed.IsSmaller(DriverStrategy.BrakeTrigger.NextTargetSpeed, Constants.SimulationSettings.BrakeTriggerSpeedTolerance)
if (DataBus.VehicleInfo.VehicleSpeed <= DriverStrategy.BrakeTrigger.NextTargetSpeed
&& !DataBus.VehicleInfo.VehicleStopped) {
var retVal = HandleTargetspeedReached(absTime, ds, targetVelocity, gradient);
for (var i = 0; i < 3 && retVal == null; i++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment