mirror of
https://github.com/MaSzyna-EU07/StarterNG.git
synced 2026-11-19 15:02:15 +01:00
Merge main into feat/tapes-from-blackbox
Conflicts: - CabPanel.cs: main (#50) tells the screen reader what the panel draws, this branch keeps the km/h label for the speed of the wheels beside it and shows the doors as the cab sees them. Both kept, and the speed of the wheels, new on this branch, is told to the screen reader too, as all the rest. - Records.cs: main (#55) adds the buzzers and the protection braking, this branch AsTheCabSees. Both kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -375,6 +375,21 @@ public readonly record struct CabSample(double Time, int Vehicle, Position Posit
|
||||
public bool Has(CabDevices device) => (Devices & device) == device;
|
||||
public bool Has(SecurityFlags flag) => (Security & flag) == flag;
|
||||
|
||||
/// <summary>
|
||||
/// The alerter's buzzer: its lamp not acknowledged in time. A protection with one acknowledgement for both tells
|
||||
/// the cab signalling's buzzer as the alerter's too, so the alerter's lamp has to blink with it.
|
||||
/// </summary>
|
||||
public bool VigilanceBuzzer => Has(SecurityFlags.VigilanceBeeping) && Has(SecurityFlags.Vigilance);
|
||||
|
||||
/// <summary>The cab signalling's buzzer: its lamp not acknowledged in time.</summary>
|
||||
public bool CabSignalBuzzer => Has(SecurityFlags.CabSignalBeeping);
|
||||
|
||||
/// <summary>
|
||||
/// The train protection braking for an alarm not acknowledged, its lamp blinking. Braking with no lamp is the
|
||||
/// protection with no power (TSecuritySystem::is_braking), a cab not started or a power cut: no driver's fault.
|
||||
/// </summary>
|
||||
public bool ProtectionBraking => Has(SecurityFlags.Braking) && (Has(SecurityFlags.Vigilance) || Has(SecurityFlags.CabSignal));
|
||||
|
||||
private const CabDevices LeftDoors = CabDevices.DoorsLeft | CabDevices.DoorPermitLeft;
|
||||
private const CabDevices RightDoors = CabDevices.DoorsRight | CabDevices.DoorPermitRight;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user