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

feat: interlock the line contactors with the section fans, own-converter lamp (eu07/maszyna#460)

On the ET42 the fans of each section run off that section's converter: the
section fan switch of the cab is bound to converterlocal_sw. The line
contactors of a section with its fans switched off must not close.

- New optional Cntrl. key LineContactorsInterlock=Converter|MotorBlowers.
  MotorConnectorsCheck() then also needs the vehicle's own converter
  (ConverterFlag, not the trainset's shared 110 V), or all its motor
  blowers, running. It is checked per vehicle, so only that section stays
  off, and switching the fans off on the way opens its contactors. Without
  the key nothing changes.
- New optional lamp i-converteraoff:, lit while the converter of the
  vehicle with the cab is off. i-converteroff: follows the shared 110 V, so
  with one ET42 section's fans off it stayed dark. i-converterboff: already
  covers the other section.

SVN data, to change once this is released (old data works as before):
- dynamic/pkp/et42_v2/112e-a.fiz, 112e-b.fiz: LineContactorsInterlock=Converter
  in the Cntrl. line.
- dynamic/pkp/et42_v2/112e-a.mmd.inc, 112e-b.mmd.inc:
  i-converter: nadm_przetw -> i-converteraoff: nadm_przetw,
  i-converterb: nadm_przetw_b -> i-converterboff: nadm_przetw_b,
  i-compressor: sprezarka -> i-compressoroff: sprezarka,
  i-compressorb: sprezarka_b -> i-compressorboff: sprezarka_b
  (the compressor "off" lamps already light with the compressor switched off
  or stopped by its pressure governor).

(eu07/maszyna#460)
This commit is contained in:
jerrrrycho
2026-11-07 20:36:25 +01:00
parent 939e42b611
commit f34f912b38
5 changed files with 150 additions and 1 deletions

View File

@@ -7148,7 +7148,21 @@ bool TMoverParameters::MotorConnectorsCheck()
auto const connectorsoff{false == Mains || true == FuseFlag || true == StLinSwitchOff || DirActive == 0};
return false == connectorsoff;
return false == connectorsoff && LineContactorsInterlockReleased();
}
bool TMoverParameters::LineContactorsInterlockReleased() const
{
switch (LineContactorsInterlock)
{
case line_contactors_interlock::converter:
// the converter of this very vehicle, not the 110 V of the trainset: a section with its fans off doesn't start
return ConverterFlag;
case line_contactors_interlock::motor_blowers:
return std::ranges::all_of(MotorBlowers, [](auto const &Blower) { return Blower.is_active; });
default:
return true;
}
}
bool TMoverParameters::OperatePantographsValve(operation_t const State, range_t const Notify)
@@ -11001,6 +11015,13 @@ void TMoverParameters::LoadFIZ_Cntrl(std::string const &line)
MotorBlowers[end::rear].start_type = lookup != starts.end() ? lookup->second : start_t::manual;
MotorBlowers[end::front].start_type = MotorBlowers[end::rear].start_type;
}
// what else the line contactors need to close
{
std::map<std::string, line_contactors_interlock, std::less<>> const interlocks{{"Converter", line_contactors_interlock::converter},
{"MotorBlowers", line_contactors_interlock::motor_blowers}};
auto lookup = interlocks.find(extract_value("LineContactorsInterlock", line));
LineContactorsInterlock = lookup != interlocks.end() ? lookup->second : line_contactors_interlock::none;
}
// compartment lights
{
auto lookup = starts.find(extract_value("CompartmentLightsStart", line));