Skip to content

Commit cfdada3

Browse files
committed
Preventing some runaway conditions for quick service that could lead to stuck emergency applications
1 parent 60d7a3f commit cfdada3

File tree

1 file changed

+5
-1
lines changed
  • Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS

1 file changed

+5
-1
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS/AirSinglePipe.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,9 @@ public override void Update(float elapsedClockSeconds)
670670
}
671671
if (BrakeLine1PressurePSI - dpPipe < 0)
672672
{
673+
// Prevent pipe pressure from going negative, also reset quick service to prevent runaway condition
673674
dpPipe = BrakeLine1PressurePSI;
675+
QuickServiceActive = false;
674676
}
675677

676678
if (TripleValveState != ValveState.Emergency && BrakeLine1PressurePSI < AuxResPressurePSI + 1)
@@ -694,7 +696,9 @@ public override void Update(float elapsedClockSeconds)
694696
AutoCylPressurePSI += dp;
695697
BrakeLine1PressurePSI -= dpPipe;
696698

697-
if (QuickServiceActive && AutoCylPressurePSI > QuickServiceLimitPSI) // Reset quick service if brake cylinder is above limiting valve setting
699+
// Reset quick service if brake cylinder is above limiting valve setting
700+
// Also reset quick service if cylinders manage to equalize to prevent runaway condition
701+
if (QuickServiceActive && (AutoCylPressurePSI > QuickServiceLimitPSI || AutoCylPressurePSI >= AuxResPressurePSI))
698702
QuickServiceActive = false;
699703

700704
if (TripleValveState == ValveState.Emergency)

0 commit comments

Comments
 (0)