18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-20 16:14:58 +01:00

Merge pull request #292 from MaSzyna-EU07/fix/en57-ep2-brake-charging

EN57 brakes: charging when hauled with the brake hose alone, Knorr EP brake only with control power
This commit is contained in:
2026-11-09 12:48:13 +00:00
committed by GitHub
8 changed files with 231 additions and 22 deletions

View File

@@ -4161,7 +4161,8 @@ bool TMoverParameters::SwitchEPBrake(int state)
OK = false;
if (BrakeHandle == TBrakeHandle::St113 && CabOccupied != 0)
{
if (state > 0)
// the handle works the EP contactors pneumatically, their supply is cut as the Oerlikon handle's is
if (state > 0 && EPBrakeControlPowered())
EpForce = Handle->GetEP(); // TODO: przetlumaczyc
else
EpForce = 0;
@@ -4173,6 +4174,11 @@ bool TMoverParameters::SwitchEPBrake(int state)
return OK;
}
bool TMoverParameters::EPBrakeControlPowered() const
{
return Power24vIsAvailable && DirActive != 0 && EpFuse;
}
// *************************************************************************************************
// Q: 20160711
// zwiększenie ciśnienia hamowania
@@ -4706,7 +4712,7 @@ void TMoverParameters::UpdatePipePressure(double dt)
if ((BrakeHandle == TBrakeHandle::FVel6 || BrakeHandle == TBrakeHandle::FVE408) && CabOccupied != 0)
{
if (Power24vIsAvailable && DirActive != 0 && EpFuse) // tu powinien byc jeszcze bezpiecznik EP i baterie -
if (EPBrakeControlPowered()) // tu powinien byc jeszcze bezpiecznik EP i baterie -
// temp = (Handle as TFVel6).GetCP
EpForce = Handle->GetEP();
else
@@ -4725,6 +4731,11 @@ void TMoverParameters::UpdatePipePressure(double dt)
// Ra 2014-11: na tym się wysypuje, ale nie wiem, w jakich warunkach
SendCtrlToNext("Brake", EpForce, CabActive);
}
else if (BrakeHandle == TBrakeHandle::St113 && CabOccupied != 0 && std::abs(EpForce) > 0.001 && !EPBrakeControlPowered())
{
// the EP brake switched on with the button drops out with the control's supply
SwitchEPBrake(0);
}
Pipe->Act();
PipePress = Pipe->P();