16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-21 12:29:18 +02:00

Dodany opcjonalny przełącznik aktywacji kabiny oraz rozłączania tylnego sprzęgu

This commit is contained in:
Królik Uszasty
2022-02-19 22:36:26 +01:00
parent da74c2ce28
commit fe455e3131
9 changed files with 159 additions and 13 deletions

View File

@@ -2686,12 +2686,19 @@ bool TMoverParameters::CabActivisation( bool const Enforce )
{
CabActive = CabOccupied; // sterowanie jest z kabiny z obsadą
DirAbsolute = DirActive * CabActive;
CabMaster = true;
SecuritySystem.Status |= s_waiting; // activate the alerter TODO: make it part of control based cab selection
SendCtrlToNext("CabActivisation", 1, CabActive);
}
return OK;
}
bool TMoverParameters::CabActivisationAuto(bool const Enforce)
{
bool OK = AutomaticCabActivation ? CabActivisation(Enforce) : false;
return OK;
}
// *************************************************************************************************
// Q: 20160710
// wyłączenie rozrządu
@@ -2700,11 +2707,12 @@ bool TMoverParameters::CabDeactivisation( bool const Enforce )
{
bool OK = false;
OK = Enforce || (CabActive == CabOccupied); // o ile obsada jest w kabinie ze sterowaniem
OK = Enforce || ((CabActive == CabOccupied) && CabMaster); // o ile obsada jest w kabinie ze sterowaniem
if (OK)
{
CabActive = 0;
DirAbsolute = DirActive * CabActive;
CabMaster = false;
DepartureSignal = false; // nie buczeć z nieaktywnej kabiny
SecuritySystem.Status = s_off; // deactivate alerter TODO: make it part of control based cab selection
SecuritySystem.SHPLock = false;
@@ -2714,6 +2722,12 @@ bool TMoverParameters::CabDeactivisation( bool const Enforce )
return OK;
}
bool TMoverParameters::CabDeactivisationAuto(bool const Enforce)
{
bool OK = AutomaticCabActivation ? CabDeactivisation(Enforce) : false;
return OK;
}
// *************************************************************************************************
// Q: 20160710
// Siła napędzająca drezynę po naciśnięciu wajhy
@@ -4441,6 +4455,7 @@ void TMoverParameters::UpdatePipePressure(double dt)
|| ( true == TestFlag( EngDmgFlag, 32 ) )
*/
|| ( true == s_CAtestebrake )
|| ( ( 0 == CabActive ) && InactivaCabEmergencyBrake )
|| ( ( SpringBrakeDriveEmergencyVel >= 0 )
&& ( Vel > SpringBrakeDriveEmergencyVel )
&& ( SpringBrake.IsActive ) )
@@ -10374,6 +10389,9 @@ void TMoverParameters::LoadFIZ_Cntrl( std::string const &line ) {
0;
extract_value( BackwardsBranchesAllowed, "BackwardsBranchesAllowed", line, "" );
extract_value( AutomaticCabActivation, "AutomaticCabActivation", line, "" );
extract_value( InactivaCabEmergencyBrake, "InactivaCabEmergencyBrake", line, "" );
extract_value( StopBrakeDecc, "SBD", line, "" );
extract_value( ReleaseParkingBySpringBrake, "ReleaseParkingBySpringBrake", line, "" );
extract_value( ReleaseParkingBySpringBrakeWhenDoorIsOpen, "ReleaseParkingBySpringBrakeWhenDoorIsOpen", line, "" );