Skip to content

Commit 78137ca

Browse files
committed
Automatic merge of T1.5.1-1004-g6fd841761e and 22 pull requests
- Pull request #799 at dfc715e: Consolidated wind simulation - Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters - Pull request #876 at f92de76: docs: add source for documents previously on website to source Documentation folder - Pull request #882 at 8f695a4: Blueprint/train car operations UI window - Pull request #885 at 2728d6d: feat: Add notifications to Menu - Pull request #891 at 9a1d6b2: Auto save - Pull request #892 at 1f5ba4c: Signal Function OPP_SIG_ID_TRAINPATH - Pull request #896 at 5866028: First implementation of https://blueprints.launchpad.net/or/+spec/specific-sounds-for-ai-trains - Pull request #900 at c27f32d: DMI updates - Pull request #903 at 3e390b8: Downloading route content (Github, zip) - Pull request #912 at 359cfee: New Triple Valve Features Vol. 2 - Pull request #922 at a3bc9e7: Autopilot for timetable mode - Pull request #946 at 91a03af: Advanced track sounds - Pull request #949 at 0037ba2: Oil Burning Locomotive - Pull request #952 at 8347095: Investigation - Pulsing graphics - Pull request #953 at a519452: Fix Lights Crash on Corrupt Shapes - Pull request #954 at 84c2f4b: Add Support for Multiple Track Profiles - Pull request #956 at 406cba6: Map settings saved - Pull request #959 at 2452cb0: Fix TrackViewer crash on big zoom value - Pull request #960 at c8e2a28: Fix draw state name in scripts - Pull request #962 at 46d0472: Fix pantographs on unpowered cars - Pull request #963 at 2d5a67d: Fix dynamic brake force indicator
24 parents 4f7be48 + 6fd8417 + dfc715e + d00beb9 + f92de76 + 8f695a4 + 2728d6d + 9a1d6b2 + 1f5ba4c + 5866028 + c27f32d + 3e390b8 + 359cfee + a3bc9e7 + 91a03af + 0037ba2 + 8347095 + a519452 + 84c2f4b + 406cba6 + 2452cb0 + c8e2a28 + 46d0472 + 2d5a67d commit 78137ca

File tree

1 file changed

+3
-20
lines changed

1 file changed

+3
-20
lines changed

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

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5478,37 +5478,20 @@ public virtual float GetDataOf(CabViewControl cvc)
54785478
var direction = 0; // Forwards
54795479
if (cvc is CVCGauge && ((CVCGauge)cvc).Orientation == 0)
54805480
direction = ((CVCGauge)cvc).Direction;
5481-
data = 0.0f;
54825481
data = DynamicBrakeForceN;
5483-
if (data > 0 && SpeedMpS > 0 || data < 0 && SpeedMpS < 0)
5484-
{
5485-
data = 0;
5486-
break;
5487-
}
5488-
data = Math.Abs(data);
54895482
switch (cvc.Units)
54905483
{
54915484
case CABViewControlUnits.AMPS:
5492-
if (MaxCurrentA == 0)
5493-
MaxCurrentA = (float)cvc.MaxValue;
54945485
if (DynamicBrakeMaxCurrentA == 0)
5495-
DynamicBrakeMaxCurrentA = (float)cvc.MinValue;
5496-
if (ThrottlePercent > 0)
5497-
{
5498-
data = 0;
5499-
}
5500-
if (DynamicBrakePercent > 0)
5501-
{
5502-
data = (DynamicBrakeForceN / MaxDynamicBrakeForceN) * DynamicBrakeMaxCurrentA;
5503-
}
5504-
data = Math.Abs(data);
5486+
DynamicBrakeMaxCurrentA = (float)cvc.MaxValue;
5487+
data = data / MaxDynamicBrakeForceN * DynamicBrakeMaxCurrentA;
55055488
break;
55065489

55075490
case CABViewControlUnits.NEWTONS:
55085491
break;
55095492

55105493
case CABViewControlUnits.KILO_NEWTONS:
5511-
data = data / 1000.0f;
5494+
data /= 1000.0f;
55125495
break;
55135496

55145497
case CABViewControlUnits.KILO_LBS:

0 commit comments

Comments
 (0)