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

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

driver strategy: handle the case that an underload may happen and the clutch...

driver strategy: handle the case that an underload may happen and the clutch is already re-engaged -> use engaged action
parent 2332a97b
No related branches found
No related tags found
No related merge requests found
......@@ -492,8 +492,12 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
debug.Add(new { action = "ClutchOpen -> Roll", response });
response.Switch().Case<ResponseUnderload>(
r => {
response = Driver.DrivingActionBrake(absTime, ds, velocity, gradient, r);
debug.Add(new { action = "Roll:Underload -> Brake", response });
if (DataBus.ClutchClosed(absTime)) {
response = HandleRequestEngaged(absTime, ds, velocity, gradient, false, velocity, debug);
} else {
response = Driver.DrivingActionBrake(absTime, ds, velocity, gradient, r);
debug.Add(new { action = "Roll:Underload -> Brake", response });
}
})
.Case<ResponseSpeedLimitExceeded>(
() => {
......
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