Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

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

move setting driving behavior in current state a little up so that it is also...

move setting driving behavior in current state a little up so that it is also set in case the gearbox is disengaged
parent 663ad947
No related branches found
No related tags found
No related merge requests found
......@@ -272,6 +272,10 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
(DataBus.Brakes.BrakePower.IsGreater(0) || inTorque.IsSmaller(0));
var vehicleSpeedBelowThreshold =
DataBus.VehicleInfo.VehicleSpeed.IsSmaller(ModelData.DisengageWhenHaltingSpeed);
if (!dryRun) {
CurrentState.DrivingBehavior = DataBus.DriverInfo.DriverBehavior;
}
if (halted || (driverDeceleratingNegTorque && vehicleSpeedBelowThreshold)) {
EngageTime = VectoMath.Max(EngageTime, absTime + dt);
_strategy?.Disengage(absTime, dt, outTorque, outAngularVelocity);
......@@ -284,10 +288,6 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl
return RequestGearDisengaged(absTime, dt, outTorque, outAngularVelocity, inTorque, dryRun);
}
if (!dryRun) {
CurrentState.DrivingBehavior = DataBus.DriverInfo.DriverBehavior;
}
if (GearEngaged(absTime)) {
return RequestGearEngaged(absTime, dt, outTorque, outAngularVelocity, inTorque, inTorqueLossResult, inertiaTorqueLossOut, dryRun);
} else {
......
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