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

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

driver strategy: handle the case of a gearshift response separately as this...

driver strategy: handle the case of a gearshift response separately as this may occur after an overload, e.g.
parent f8af05ce
No related branches found
No related tags found
No related merge requests found
......@@ -743,14 +743,14 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
response = Driver.DrivingActionBrake(absTime, ds, DriverStrategy.BrakeTrigger.NextTargetSpeed, gradient);
}
}).
Case<ResponseGearShift>(r => {
response = Driver.DrivingActionRoll(absTime, ds, targetVelocity, gradient);
}).
Case<ResponseEngineSpeedTooHigh>(r => {
response = Driver.DrivingActionBrake(absTime, ds, targetVelocity, gradient, r);
});
// handle the SpeedLimitExceeded Response separately in case it occurs in one of the requests in the second try
// handle the SpeedLimitExceeded Response and Gearshift Response separately in case it occurs in one of the requests in the second try
response.Switch().
Case<ResponseGearShift>(r => {
response = Driver.DrivingActionRoll(absTime, ds, targetVelocity, gradient);
}).
Case<ResponseSpeedLimitExceeded>(() => {
response = Driver.DrivingActionBrake(absTime, ds, DataBus.VehicleSpeed,
gradient);
......
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