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

overload relay control, generic brake handles sound fix

This commit is contained in:
tmj-fstate
2017-04-14 15:17:32 +02:00
parent fafb7a63c3
commit 57c213fd1d
8 changed files with 189 additions and 71 deletions

View File

@@ -676,10 +676,23 @@ bool TMoverParameters::CurrentSwitch(int direction)
if (TrainType != dt_EZT)
return (MinCurrentSwitch(direction != 0));
}
if (EngineType == DieselEngine) // dla 2Ls150
if (ShuntModeAllow)
if (ActiveDir == 0) // przed ustawieniem kierunku
ShuntMode = ( direction != 0 );
// TBD, TODO: split off shunt mode toggle into a separate command? It doesn't make much sense to have these two together like that
// dla 2Ls150
if( ( EngineType == DieselEngine )
&& ( true == ShuntModeAllow )
&& ( ActiveDir == 0 ) ) {
// przed ustawieniem kierunku
ShuntMode = ( direction != 0 );
return true;
}
// for SM42/SP42
if( ( EngineType == DieselElectric )
&& ( true == ShuntModeAllow )
&& ( MainCtrlPos == 0 ) ) {
ShuntMode = ( direction != 0 );
return true;
}
return false;
};