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 b4a39c58 authored by Stefanos DOUMPOULAKIS's avatar Stefanos DOUMPOULAKIS
Browse files

Merge branch 'fix/294_avoid_disengage_lowspeed' into 'amdm2/develop'

Fix not allowing disengaging if propulsion from engine is needed to reach halting distance

See merge request vecto/vecto!172
parents d5367a9b 8221603f
No related branches found
No related tags found
No related merge requests found
......@@ -178,9 +178,15 @@ namespace TUGraz.VectoCore.Models.SimulationComponent.Impl.Shiftstrategies
var disengageTCEngineSpeedLowerIdle = braking && torqueNegative && gear1C &&
inAngularVelocity.IsSmallerOrEqual(DataBus.EngineInfo.EngineIdleSpeed);
if (disengageBeforeHalting || disengageTCEngineSpeedLowerIdle || disengageAngularVelocityZero ||
disengageTOutNegativeAndTInPositive) {
_nextGear.SetState(absTime, disengaged: true, gear: Gears.First());
if (disengageBeforeHalting
|| disengageTCEngineSpeedLowerIdle
|| disengageAngularVelocityZero
|| disengageTOutNegativeAndTInPositive)
{
// In order to make it to the halting distance do not allow disengaging if propulsion from engine is needed.
bool allowDisengageGear = braking && !torqueNegative && slowerThanDisengageSpeed;
_nextGear.SetState(absTime, disengaged: !allowDisengageGear, gear: Gears.First());
return true;
}
......
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