16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 03:09:18 +02:00

security system tweaks

This commit is contained in:
milek7
2019-10-04 19:51:48 +02:00
parent 106f64f0ba
commit fece956ffd
2 changed files with 10 additions and 8 deletions

View File

@@ -87,15 +87,17 @@ void TSecuritySystem::set_enabled(bool e) {
void TSecuritySystem::acknowledge_press() {
pressed = true;
if (vigilance_timer > AwareDelay) {
alert_timer = 0.0;
vigilance_timer = 0.0;
return;
}
vigilance_timer = 0.0;
if (!separate_acknowledge && cabsignal_active) {
cabsignal_active = false;
alert_timer = 0.0;
return;
}
if (vigilance_timer > AwareDelay)
alert_timer = 0.0;
vigilance_timer = 0.0;
}
void TSecuritySystem::acknowledge_release() {
@@ -170,7 +172,7 @@ bool TSecuritySystem::is_cabsignal_beeping() const {
bool TSecuritySystem::is_braking() const {
return alert_timer > SoundSignalDelay + EmergencyBrakeDelay
&& velocity > AwareMinSpeed;
&& (velocity > AwareMinSpeed || pressed);
}
bool TSecuritySystem::radiostop_available() const {

View File

@@ -604,8 +604,8 @@ TTrain::state_t
TTrain::get_state() const {
return {
mvOccupied->SecuritySystem.is_cabsignal_blinking(),
mvOccupied->SecuritySystem.is_vigilance_blinking(),
btLampkaSHP.GetValue(),
btLampkaCzuwaka.GetValue(),
btLampkaRadioStop.GetValue(),
btLampkaOpory.GetValue(),
btLampkaWylSzybki.GetValue(),