Skip to content

Commit b4bf231

Browse files
committed
Automatic merge of T1.5.1-535-g2f57132ee and 10 pull requests
- Pull request #757 at 98dd1a7: Unify RailDriver code implementations - Pull request #821 at cc3af66: Adds suppression of safety valves - Pull request #831 at 61bbf43: poor mans switch panel on tablet - Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters - Pull request #841 at 410a585: https://blueprints.launchpad.net/or/+spec/animating-trainset-windows - Pull request #853 at a9760ec: Notify out of focus - Pull request #855 at b39e5d8: Adds new route from TrainSimulations - Pull request #856 at ce66076: Add Alternate Syntax for Confusing Tokens - Pull request #857 at 22312be: Adding Air Flow Meters - Pull request #858 at bbaeeba: Fix wheel animation problems
12 parents 0b8f788 + 2f57132 + 98dd1a7 + cc3af66 + 61bbf43 + d00beb9 + 410a585 + a9760ec + b39e5d8 + ce66076 + 22312be + bbaeeba commit b4bf231

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

Source/Orts.Formats.Msts/CabViewFile.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,8 @@ public enum CABViewControlUnits
342342
YARDS,
343343

344344
CUBIC_FT_MIN,
345-
LITRES_S
345+
LITRES_S,
346+
LITERS_S
346347
}
347348

348349
public enum DiscreteStates

Source/Orts.Simulation/Simulation/RollingStocks/MSTSLocomotive.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5433,6 +5433,7 @@ public virtual float GetDataOf(CabViewControl cvc)
54335433
break;
54345434

54355435
case CABViewControlUnits.LITRES_S:
5436+
case CABViewControlUnits.LITERS_S:
54365437
data = this.FilteredBrakePipeFlowM3pS * 1000.0f;
54375438
break;
54385439

@@ -5566,7 +5567,6 @@ public virtual float GetDataOf(CabViewControl cvc)
55665567

55675568
}
55685569
}
5569-
55705570
}
55715571
else
55725572
{

Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/Controllers/MSTSBrakeController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ static void IncreasePressure(ref float pressureBar, float targetBar, float rateB
415415
{
416416
float dp = rateBarpS * elapsedSeconds;
417417
if (targetBar - pressureBar < 0.5f) // Slow down increase when nearing target to simulate chokes in brake valve
418-
dp *= Math.Min((targetBar - pressureBar) / 0.5f + 0.1f, 1.0f);
418+
dp *= Math.Min(((targetBar - pressureBar) / 0.5f) + 0.1f, 1.0f);
419419
pressureBar += dp;
420420
if (pressureBar > targetBar)
421421
pressureBar = targetBar;
@@ -428,7 +428,7 @@ static void DecreasePressure(ref float pressureBar, float targetBar, float rateB
428428
{
429429
float dp = rateBarpS * elapsedSeconds;
430430
if (pressureBar - targetBar < 0.5f) // Slow down decrease when nearing target to simulate chokes in brake valve
431-
dp *= Math.Min((pressureBar - targetBar) / 0.5f + 0.1f, 1.0f);
431+
dp *= Math.Min(((pressureBar - targetBar) / 0.5f) + 0.1f, 1.0f);
432432
pressureBar -= dp;
433433
if (pressureBar < targetBar)
434434
pressureBar = targetBar;

0 commit comments

Comments
 (0)