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

fix(cab): on the SU45 and SU46 the open line contactors lamp lights with the contactors opened by the pressure switch (eu07/maszyna#263)

On the electric locomotives the lamp of the open line contactors tells the start can be made, so it goes out with the
start cut off by the pressure switch. The diesel-electric SU45 and SU46 (the only diesel-electrics with the lamp) use
it just to show the contactors are open, but it went out the same way: with too low a pressure in the main pipe the
contactors were open and the lamp out. Once the pressure came back with the master controller past the first
position, the contactors stayed open, as they should, and the lamp lit up on a power position, which looked like
the lamp working the other way round.

On the diesel-electrics TMoverParameters::LineContactorsLampLit() now follows the contactors alone; the electric
locomotives and the other main circuit lamps are unchanged.

Tests: tests/unit/test_line_contactors.cpp, on a locomotive made after the SU46.
This commit is contained in:
jerrrrycho
2026-11-07 14:06:58 +01:00
parent 466cbbbfa1
commit d90edb6980
3 changed files with 124 additions and 1 deletions

View File

@@ -2461,9 +2461,15 @@ class TMoverParameters
{
return false == ControlPressureSwitch && (HasControlPressureSwitch || BrakePress < 1.0);
}
// whether the lamp of the open line contactors is lit, telling the start can be made
// whether the lamp of the open line contactors is lit. on the electric locomotives it tells the start can be made, so
// it goes out with the start cut off; on the diesel-electric ones (the SU45 and SU46 family) it just tells the
// contactors are open, whatever opened them: the master controller at 0, or the pressure switch (eu07/maszyna#263)
bool LineContactorsLampLit() const
{
if (EngineType == TEngineType::DieselElectric)
{
return false == StLinFlag;
}
return false == StLinFlag && MainCircuitLampsEnabled();
}
// whether the pumps a joint oil and fuel pump switch works, those not started automatically, are all switched on