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)
488
488
{
489
489
// the following reduces the brake cylinder and vacuum reservoir to 0inHg if the bleed valve is operated
490
490
float dp = elapsedClockSeconds * MaxApplicationRatePSIpS ;
491
- VacResPressurePSIA += dp ;
492
- if ( VacResPressurePSIA > OneAtmospherePSI )
493
- {
494
- VacResPressurePSIA = OneAtmospherePSI ;
495
- }
496
491
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 ) ;
502
495
503
496
}
504
497
else if ( BrakeLine1PressurePSI < VacResPressurePSIA )
You can’t perform that action at this time.
0 commit comments