You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Source/Orts.Simulation/Simulation/RollingStocks/SubSystems/CruiseControl.cs
+16-12Lines changed: 16 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -117,8 +117,8 @@ public float SetSpeedKpHOrMpH
117
117
publicfloatMaxDecelerationMpSS=2;
118
118
publicfloat?ThrottlePercent{get;privateset;}
119
119
publicfloat?DynamicBrakePercent{get;privateset;}
120
-
publicfloatTrainBrakePercent{get;privateset;}
121
-
publicfloatEngineBrakePercent{get;privateset;}
120
+
publicfloat?TrainBrakePercent{get;privateset;}
121
+
publicfloat?EngineBrakePercent{get;privateset;}
122
122
protectedfloattrainLength=0;
123
123
publicintTrainLengthMeters=0;
124
124
OdoMeterRestrictedRegionOdometer;
@@ -588,8 +588,8 @@ public void Update(float elapsedClockSeconds)
588
588
CCThrottleOrDynBrakePercent=0;
589
589
ThrottlePercent=null;
590
590
DynamicBrakePercent=null;
591
-
TrainBrakePercent=0;
592
-
EngineBrakePercent=0;
591
+
TrainBrakePercent=null;
592
+
EngineBrakePercent=null;
593
593
return;
594
594
}
595
595
if(firstIteration)// if this is executed the first time, let's check all other than player engines in the consist, and record them for further throttle manipulation
@@ -643,8 +643,8 @@ public void Update(float elapsedClockSeconds)
643
643
CCThrottleOrDynBrakePercent=0;
644
644
ThrottlePercent=null;
645
645
DynamicBrakePercent=null;
646
-
TrainBrakePercent=0;
647
-
EngineBrakePercent=0;
646
+
TrainBrakePercent=null;
647
+
EngineBrakePercent=null;
648
648
}
649
649
elseif(SpeedRegMode==SpeedRegulatorMode.Auto)
650
650
{
@@ -755,14 +755,14 @@ public void Update(float elapsedClockSeconds)
0 commit comments