18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-25 00:49:13 +01:00

feat: SM42 vigilance device switched off in the shunt mode (eu07/maszyna#457)

The shunt mode of the diesel-electrics (ShuntMode=1: SM42, SP42, SU42) now
suspends their vigilance device (CA): no alerter while running, no alarm for the
button held too long, and an alarm already on goes out. The cab signalling (SHP)
stays as it was. Back in the line mode the CA works as before.
This commit is contained in:
jerrrrycho
2026-11-07 20:13:46 +01:00
parent a86bcb1ef5
commit 329dc4e42e
3 changed files with 59 additions and 4 deletions

View File

@@ -1131,6 +1131,7 @@ class TSecuritySystem
bool is_sifa = false; // Sifa-like pedal device, with inverted input for convenient keyboard usage
bool separate_acknowledge = false; // cabsignal reset button is separate from vigilance
bool cabsignal_lock = false;
bool vigilance_suspended = false; // the vigilance device switched off by the vehicle, as by the SM42's shunt mode
double vigilance_timer = 0.0;
double alert_timer = 0.0;
@@ -1155,6 +1156,7 @@ class TSecuritySystem
void update(double dt, double Vel, bool pwr, int cab);
void set_cabsignal();
void set_cabsignal_lock(bool);
void set_vigilance_suspended(bool Suspended);
bool is_blinking() const;
bool is_vigilance_blinking() const;
bool is_cabsignal_blinking() const;