@@ -135,7 +135,7 @@ public class MSTSSteamLocomotive : MSTSLocomotive
135135 public bool BoosterGearsEngaged = false;
136136 public bool SteamBoosterLatchedLocked = false;
137137 public float SteamBoosterPressurePSI;
138- float BoosterGearEngageTimeS ;
138+ float BoosterGearEngageTimerS ;
139139 float BoosterIdleHeatingTimerS;
140140 float BoosterIdleHeatingTimePeriodS = 120; // This is the time period that the Booster needs to be idled to heat it up
141141 bool BoosterIdleHeatingTimerReset = false;
@@ -2301,7 +2301,7 @@ public override void Update(float elapsedClockSeconds)
23012301 BoosterCylinderSteamExhaustOn = false;
23022302 BoosterCylinderCocksOn = true;
23032303 enginethrottle = 0.0f;
2304- BoosterGearEngageTimeS = 0;
2304+ BoosterGearEngageTimerS = 0;
23052305
23062306 // Allow time for cylinders to heat up
23072307 if (!BoosterIdleHeatingTimerReset)
@@ -2326,7 +2326,7 @@ public override void Update(float elapsedClockSeconds)
23262326
23272327// Trace.TraceInformation("Run Mode - Timer {0} GearPeriod {1}", BoosterGearEngageTimeS, BoosterGearEngageTimePeriodS);
23282328
2329- if (BoosterGearEngageTimeS > BoosterGearEngageTimePeriodS) // Booster gears engaged
2329+ if (BoosterGearEngageTimerS > BoosterGearEngageTimePeriodS) // Booster gears engaged
23302330 {
23312331 enginethrottle = throttle;
23322332 BoosterCylinderSteamExhaustOn = true;
@@ -2336,12 +2336,17 @@ public override void Update(float elapsedClockSeconds)
23362336 BoosterIdleHeatingTimerS = 0;
23372337 // Trace.TraceInformation("Run Mode - " );
23382338 }
2339- else
2339+ else // Booster gears have not engaged yet
23402340 {
23412341 BoosterCylinderSteamExhaustOn = false;
23422342 BoosterCylinderCocksOn = true;
2343- }
2344- BoosterGearEngageTimeS += elapsedClockSeconds;
2343+ BoosterGearEngageTimerS += elapsedClockSeconds;
2344+ }
2345+ }
2346+ else if (SteamBoosterAirOpen && SteamBoosterIdle) // Move booster to run mode, but not latched
2347+ {
2348+ BoosterCylinderSteamExhaustOn = false;
2349+ BoosterCylinderCocksOn = true;
23452350 }
23462351 else if (!SteamBoosterAirOpen || !SteamBoosterLatchedLocked) // Turn Booster off completely
23472352 {
@@ -2350,7 +2355,7 @@ public override void Update(float elapsedClockSeconds)
23502355 BoosterCylinderSteamExhaustOn = false;
23512356 BoosterCylinderCocksOn = false;
23522357 enginethrottle = 0;
2353- BoosterGearEngageTimeS = 0;
2358+ BoosterGearEngageTimerS = 0;
23542359 BoosterIdleHeatingTimerReset = false;
23552360 BoosterCylinderSteamExhaustOn = false;
23562361 BoosterGearsEngaged = false;
@@ -7146,6 +7151,19 @@ public override string GetDebugStatus()
71467151 BoosterGearsEngaged ? Simulator.Catalog.GetString("On") : Simulator.Catalog.GetString("Off")
71477152 );
71487153
7154+ // Temporary debug script.
7155+ status.AppendFormat("{0}\t{1}\t{2:N2}\t{3}\t{4:N2}\t{5}\t{6:N2}\t{7}\t{8}\n",
7156+ Simulator.Catalog.GetString("Boost:"),
7157+ Simulator.Catalog.GetString("GearT"),
7158+ BoosterGearEngageTimerS,
7159+ Simulator.Catalog.GetString("GearP"),
7160+ BoosterGearEngageTimePeriodS,
7161+ Simulator.Catalog.GetString("IdleT"),
7162+ BoosterIdleHeatingTimerS,
7163+ Simulator.Catalog.GetString("IdleP"),
7164+ BoosterIdleHeatingTimePeriodS
7165+ );
7166+
71497167#if DEBUG_LOCO_STEAM_USAGE
71507168 status.AppendFormat("{0}\t{1}\t{2:N2}\t{3}\t{4:N2}\t{5}\t{6:N2}\t{7}\t{8}\t{9}\t{10}\t{11}\t{12:N2}\t{13}\t{14:N2}\t{15}\t{16:N2}\t{17}\t{18:N2}\t{19}\t{20:N2}\t{21}\t{22}\n",
71517169 "DbgUse:",
0 commit comments