Skip to content

Commit c285678

Browse files
committed
Train DPU info, the Load values are unstable
1 parent 0c860a3 commit c285678

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Source/Orts.Simulation/Simulation/RollingStocks/MSTSDieselLocomotive.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,12 @@ public string GetDpuStatus(bool dataDpu, CABViewControlUnits loadUnits = CABView
990990
{
991991
data = (data / MaxDynamicBrakeForceN) * DynamicBrakeMaxCurrentA;
992992
}
993+
if (ThrottlePercent == 0 && data > 0)
994+
{
995+
data = DynamicBrakePercent == -1? (data / MaxForceN) * MaxCurrentA
996+
: DynamicBrakePercent == 0? (data / MaxDynamicBrakeForceN) * DynamicBrakeMaxCurrentA
997+
: data;
998+
}
993999
status.AppendFormat("{0:F0} A", data);
9941000
break;
9951001

0 commit comments

Comments
 (0)