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

Merge pull request #282 from MaSzyna-EU07/fix/freight-brake-setting-cw1

AI wagon inspector: brake settings G/P/R by the instruction Cw-1 (eu07/maszyna#350)
This commit is contained in:
maj00r
2026-11-11 14:21:28 +01:00
committed by GitHub
11 changed files with 1036 additions and 103 deletions

View File

@@ -2124,6 +2124,9 @@ class TMoverParameters
bool UnlockPipe = false; /*unlockig brake pipe button pressed*/
int BrakeDelayFlag = 0; /*nastawa opoznienia ham. osob/towar/posp/exp 0/1/2/4*/
int BrakeDelays = 0; /*nastawy mozliwe do uzyskania*/
// the AI wagon inspector cut the brake out (b_dmg) and puts it back when the train no longer needs it
// cut out (brake_setting::apply). Anyone else cutting it out or putting it back takes it over
bool BrakeCutOutByInspector = false;
int BrakeOpModeFlag = 0; /*nastawa trybu pracy PS/PN/EP/MED 1/2/4/8*/
int BrakeOpModes = 0; /*nastawy mozliwe do uzyskania*/
bool DynamicBrakeFlag = false; /*czy wlaczony hamulec elektrodymiczny*/

View File

@@ -1467,7 +1467,7 @@ double TESt4R::GetPF(double const PP, double const dt, double const Vel)
result = dv - dV1;
RapidStatus = BrakeDelayFlag == bdelay_R && ((Vel > 55 && RapidStatus == true) || Vel > 70);
RapidStatus = (BrakeDelayFlag & bdelay_R) == bdelay_R && ((Vel > 55 && RapidStatus == true) || Vel > 70);
RapidTemp = RapidTemp + (0.9 * int(RapidStatus) - RapidTemp) * dt / 2;
temp = 1.9 - RapidTemp;
@@ -1770,7 +1770,7 @@ double TLSt::GetPF(double const PP, double const dt, double const Vel)
// if Vel>55 then temp:=0.72 else
// temp:=1;{R}
// cisnienie PP
RapidTemp = RapidTemp + (RM * int(Vel > 55 && BrakeDelayFlag == bdelay_R) - RapidTemp) * dt / 2;
RapidTemp = RapidTemp + (RM * int(Vel > 55 && (BrakeDelayFlag & bdelay_R) == bdelay_R) - RapidTemp) * dt / 2;
temp = 1 - RapidTemp;
if (EDFlag > 0.2)
temp = 10000;
@@ -1989,7 +1989,7 @@ double TEStED::GetPF(double const PP, double const dt, double const Vel)
dv = dv + PF(MPP, VVP, 0.02);
Miedzypoj->Flow(dv * dt * 0.15);
RapidTemp = RapidTemp + (RM * int(Vel > RV && BrakeDelayFlag == bdelay_R) - RapidTemp) * dt / 2;
RapidTemp = RapidTemp + (RM * int(Vel > RV && (BrakeDelayFlag & bdelay_R) == bdelay_R) - RapidTemp) * dt / 2;
temp = std::max(1 - RapidTemp, 0.001);
// if EDFlag then temp:=1000;
// temp:=temp/(1-);