File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed
Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Brakes/MSTS Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -488,17 +488,10 @@ public override void Update(float elapsedClockSeconds)
488488 {
489489 // the following reduces the brake cylinder and vacuum reservoir to 0inHg if the bleed valve is operated
490490 float dp = elapsedClockSeconds * MaxApplicationRatePSIpS ;
491- VacResPressurePSIA += dp ;
492- if ( VacResPressurePSIA > OneAtmospherePSI )
493- {
494- VacResPressurePSIA = OneAtmospherePSI ;
495- }
496491
497- CylPressurePSIA += dp ;
498- if ( CylPressurePSIA > OneAtmospherePSI )
499- {
500- CylPressurePSIA = OneAtmospherePSI ;
501- }
492+ VacResPressurePSIA = Math . Min ( VacResPressurePSIA + dp , OneAtmospherePSI ) ;
493+
494+ CylPressurePSIA = Math . Min ( CylPressurePSIA + dp , OneAtmospherePSI ) ;
502495
503496 }
504497 else if ( BrakeLine1PressurePSI < VacResPressurePSIA )
You can’t perform that action at this time.
0 commit comments