diff --git a/Eu07.BlackBox.Views/BlackBoxStrings.cs b/Eu07.BlackBox.Views/BlackBoxStrings.cs index f653599..645599d 100644 --- a/Eu07.BlackBox.Views/BlackBoxStrings.cs +++ b/Eu07.BlackBox.Views/BlackBoxStrings.cs @@ -203,7 +203,7 @@ public sealed class DefaultBlackBoxStrings : IBlackBoxStrings ["CabLightsWant"] = "{0}, should be {1}", ["CabLightsNone"] = "no lamps", ["CabBrakeSetting"] = "setting {0}", - ["CabEqualizing"] = "Equalizing reservoir", + ["CabDriverValve"] = "Driver's valve", ["CabFeedPipe"] = "Main reservoir pipe", ["CabConsistCylinder"] = "Cylinders, train max", ["CabPower"] = "Power", @@ -214,7 +214,7 @@ public sealed class DefaultBlackBoxStrings : IBlackBoxStrings ["CabEngine"] = "Engine", ["CabNoDrive"] = "no drive of its own", ["CabClutch"] = "Clutch", - ["CabConverterFill"] = "Torque converter", + ["CabConverterFill"] = "Converter", ["CabIntegrated"] = "Driving handle", ["CabGroupDoors"] = "Doors", ["DevDoorPermitLeft"] = "Left doors permitted", @@ -474,7 +474,7 @@ public sealed class DefaultBlackBoxStrings : IBlackBoxStrings ["CabLightsWant"] = "{0}, a ma być {1}", ["CabLightsNone"] = "brak lamp", ["CabBrakeSetting"] = "nastawa {0}", - ["CabEqualizing"] = "Zbiornik czasowy", + ["CabDriverValve"] = "Zawór maszynisty", ["CabFeedPipe"] = "Przewód zasilający", ["CabConsistCylinder"] = "Cylindry, skład max", ["CabPower"] = "Moc", @@ -485,7 +485,7 @@ public sealed class DefaultBlackBoxStrings : IBlackBoxStrings ["CabEngine"] = "Silnik", ["CabNoDrive"] = "brak własnego napędu", ["CabClutch"] = "Sprzęgło", - ["CabConverterFill"] = "Przekładnia hydr.", + ["CabConverterFill"] = "Przekładnia", ["CabIntegrated"] = "Zadajnik", ["CabGroupDoors"] = "Drzwi", ["DevDoorPermitLeft"] = "Zezwolenie lewe", @@ -500,7 +500,7 @@ public sealed class DefaultBlackBoxStrings : IBlackBoxStrings ["DevMotorBlowers"] = "Wentylatory silników", ["DevEngineHot"] = "Przegrzanie silnika", ["DevSpeedControl"] = "Tempomat", - ["DevRadioChannel"] = "Radiotelefon, kanał {0}", + ["DevRadioChannel"] = "Radio, kanał {0}", ["DevHandBrake"] = "Hamulec ręczny", ["DevHornTone"] = "Syrena ({0})", ["HornLow"] = "niski", diff --git a/Eu07.BlackBox.Views/CabPanel.cs b/Eu07.BlackBox.Views/CabPanel.cs index 205a14a..077dd54 100644 --- a/Eu07.BlackBox.Views/CabPanel.cs +++ b/Eu07.BlackBox.Views/CabPanel.cs @@ -20,7 +20,7 @@ public sealed class CabPanel : Control { private const double Pad = 14; private const double LampRow = 14; - private const int DoorColumns = 3; + private const int DoorColumns = 2; private Recording? _recording; private double _time; @@ -34,7 +34,7 @@ public sealed class CabPanel : Control public CabPanel() { ClipToBounds = true; - Height = 650; + Height = 664; } public IBlackBoxStrings Strings { get; set; } = new DefaultBlackBoxStrings(); @@ -129,8 +129,8 @@ public sealed class CabPanel : Control double y = top + gauge; if (extra is { } x1) { - // where the driver's brake valve takes the pipe - Gauge(context, Strings["CabEqualizing"], x1.EqualizingReservoir, 6, null, $"{x1.EqualizingReservoir:0.00} bar", Palette.Target, Pad, y, width); + // what the driver's brake valve shows: its equalizing reservoir, the FV4a's time reservoir + Gauge(context, Strings["CabDriverValve"], x1.DriverValve, 6, null, $"{x1.DriverValve:0.00} bar", Palette.Target, Pad, y, width); y += gauge; } Gauge(context, Strings["CabCylinder"], s.BrakeCylinder, 6, null, $"{s.BrakeCylinder:0.0} bar", Palette.Brakes, Pad, y, width); @@ -211,7 +211,7 @@ public sealed class CabPanel : Control x += groupWidth; } - // The doors under them, across: open, permitted, the departure signal, the steps and the lock. + // The doors under them, in two columns: open, permitted, the departure signal, the steps and the lock. top = Math.Max(bottom, top + 16 + 9 * LampRow) + 6; context.DrawText(MapView.Text(Strings["CabGroupDoors"], Palette.DimText, 10, FontWeight.SemiBold), new Point(Pad, top)); var doors = Doors(s); @@ -232,8 +232,11 @@ public sealed class CabPanel : Control /// private void DrawDrive(DrawingContext context, CabSample s, double top, double third, CultureInfo culture) { - void At(int column, int row, string label, string value, IBrush? brush = null) => - Value(context, label, value, Pad + column * third, top + row * 36, brush); + void At(int column, int row, string label, string value, IBrush? brush = null) + { + using (context.PushClip(new Rect(Pad + column * third, top + row * 36, third - 4, 34))) + Value(context, label, value, Pad + column * third, top + row * 36, brush); + } string voltage = _powered.Contains(s.Vehicle) ? $"{s.Voltage:0} V" : "—"; if (s.Extra is not { } e) @@ -535,7 +538,7 @@ public sealed class CabPanel : Control return [("CabGroupPower", power.ToArray()), ("CabGroupDriving", driving.ToArray()), ("CabGroupSafety", safety.ToArray())]; } - /// The doors of the vehicle the user is in, in rows of three: open, the lock, the permits, the steps, the departure signal. + /// The doors of the vehicle the user is in, in rows of two: open, the lock, the permits, the steps, the departure signal. private (string Text, IBrush? Lit)[] Doors(CabSample s) { (string, IBrush?) On(string key, CabDevices device, IBrush colour) => (Strings[key], s.Has(device) ? colour : null); diff --git a/Eu07.BlackBox.Views/EventList.cs b/Eu07.BlackBox.Views/EventList.cs index d5db582..be3b07d 100644 --- a/Eu07.BlackBox.Views/EventList.cs +++ b/Eu07.BlackBox.Views/EventList.cs @@ -267,12 +267,15 @@ public sealed class EventList : ListBox _ => "CameraFree" }; - /// The switches the driver worked, as the cab tells them: what came on and went off. + /// + /// The switches the driver worked, as the cab tells them: what came on and went off. Not the compressor and the + /// motor fans, which go on and off by themselves. + /// private static readonly (CabDevices Device, string Key)[] Switched = [ (CabDevices.MainBreaker, "DevMainBreaker"), (CabDevices.PantographFront, "DevPantographFront"), (CabDevices.PantographRear, "DevPantographRear"), (CabDevices.FuelPump, "DevFuelPump"), (CabDevices.OilPump, "DevOilPump"), - (CabDevices.Converter, "DevConverter"), (CabDevices.Compressor, "DevCompressor"), (CabDevices.MotorBlowers, "DevMotorBlowers"), + (CabDevices.Converter, "DevConverter"), (CabDevices.Heating, "DevHeating"), (CabDevices.Radio, "DevRadio"), (CabDevices.ShuntMode, "DevShuntMode"), (CabDevices.SpringBrake, "DevSpringBrake"), (CabDevices.BrakeReleaser, "DevBrakeReleaser"), (CabDevices.DoorPermitLeft, "DevDoorPermitLeft"), (CabDevices.DoorPermitRight, "DevDoorPermitRight"), diff --git a/Eu07.BlackBox/HeadCodes.cs b/Eu07.BlackBox/HeadCodes.cs index fb4f335..5ddeec0 100644 --- a/Eu07.BlackBox/HeadCodes.cs +++ b/Eu07.BlackBox/HeadCodes.cs @@ -86,13 +86,13 @@ public static class HeadCodes _ => null }; - /// Whether both ends showed what they were to; null when nothing tells it. /// /// An end with no lamp at all, a draisine's: the simulator still asks it for a signal it can't show, so it /// is not judged. A recording made before the lamps were written can't tell. /// public static bool NoLamps(Lights? equipped) => equipped == Lights.None; + /// Whether both ends showed what they were to; null when nothing tells it. public static bool? Right(CabSample sample) => HeadRight(sample) is { } head && TailRight(sample) is { } tail ? head && tail : null; diff --git a/Eu07.BlackBox/Records.cs b/Eu07.BlackBox/Records.cs index fa2ca96..a5046af 100644 --- a/Eu07.BlackBox/Records.cs +++ b/Eu07.BlackBox/Records.cs @@ -118,12 +118,12 @@ public enum EngineKind : byte /// /// The rest of a look at the user's train, written from the same version as the doors' permits: what drives it, -/// the brakes' setting and mode, the hand brake, the radio, the horn, the pressures of the equalizing reservoir -/// and the main reservoir pipe, a diesel's oil, temperatures, clutch and torque converter, the cruise control, +/// the brakes' setting and mode, the hand brake, the radio, the horn, the pressure the driver's brake valve shows +/// (its equalizing reservoir, the FV4a's time reservoir) and that of the main reservoir pipe, a diesel's oil, temperatures, clutch and torque converter, the cruise control, /// the power and the integrated controller of a unit, the highest brake cylinder pressure of the train. The /// temperatures and the oil mean something for a diesel only. /// -public readonly record struct CabExtra(EngineKind Engine, byte BrakeDelay, byte RadioChannel, float EqualizingReservoir, +public readonly record struct CabExtra(EngineKind Engine, byte BrakeDelay, byte RadioChannel, float DriverValve, float FeedPipe, float OilPressure, float WaterTemperature, float OilTemperature, float EngineTemperature, float SpeedControlKmh, float EnginePower, sbyte HandBrake, byte BrakeMode, byte Horn, float IntegratedController, float Clutch, float ConverterFill,