diff --git a/McZapkie/MOVER.h b/McZapkie/MOVER.h index c7d9cdbec..f7eb2fe56 100644 --- a/McZapkie/MOVER.h +++ b/McZapkie/MOVER.h @@ -2163,6 +2163,7 @@ class TMoverParameters bool StLinFlag = false; /*!o styczniki liniowe*/ bool StLinSwitchOff{false}; // state of the button forcing motor connectors open line_contactors_interlock LineContactorsInterlock{line_contactors_interlock::none}; // what else the line contactors need to close + double LouvresOpenPressure{5.0}; // main reservoir pressure [bar] at which the pneumatic louvres of the motor fans open (ET22) bool ResistorsFlag = false; /*!o jazda rezystorowa*/ double RventRot = 0.0; /*!s obroty wentylatorow rozruchowych*/ double PantographVoltage{0.0}; // voltage supplied to pantographs @@ -2477,6 +2478,11 @@ class TMoverParameters { return false == StLinFlag && MainCircuitLampsEnabled(); } + // whether the pneumatic louvres of the motor fans are still closed, the main reservoir short of the pressure that opens them + bool LouvresClosed() const + { + return Compressor < LouvresOpenPressure; + } // whether the devices the line contactors are interlocked with (LineContactorsInterlock) let them close bool LineContactorsInterlockReleased() const; // whether the pumps a joint oil and fuel pump switch works, those not started automatically, are all switched on diff --git a/McZapkie/Mover.cpp b/McZapkie/Mover.cpp index f5f88a681..a2845569c 100644 --- a/McZapkie/Mover.cpp +++ b/McZapkie/Mover.cpp @@ -11022,6 +11022,7 @@ void TMoverParameters::LoadFIZ_Cntrl(std::string const &line) auto lookup = interlocks.find(extract_value("LineContactorsInterlock", line)); LineContactorsInterlock = lookup != interlocks.end() ? lookup->second : line_contactors_interlock::none; } + extract_value(LouvresOpenPressure, "LouvresOpenPressure", line, ""); // compartment lights { auto lookup = starts.find(extract_value("CompartmentLightsStart", line)); diff --git a/tests/unit/test_line_contactors_interlock.cpp b/tests/unit/test_line_contactors_interlock.cpp index a34bcac7d..104d732e1 100644 --- a/tests/unit/test_line_contactors_interlock.cpp +++ b/tests/unit/test_line_contactors_interlock.cpp @@ -6,6 +6,7 @@ // the line contactors interlocked with the fans of the traction motors (eu07/maszyna#460): on the ET42 the fans of a // section run off its own converter, and with them switched off the line contactors of that section don't close. +// the louvres of the fans of the ET22 open with the air of the main reservoir (eu07/maszyna#451) using test::definition; using test::vehicle; @@ -108,3 +109,18 @@ TEST_CASE("line contactors interlock: the ET42 section with its fans switched of CHECK_FALSE(rear.StLinFlag); CHECK(front.StLinFlag); } + +TEST_CASE("louvres: closed until the main reservoir reaches the pressure that opens them") { + vehicle et22{definition::fiz("et22_v3/201e-w")}; + CHECK(et22->LouvresOpenPressure == doctest::Approx(5.0)); // by default + et22->Compressor = 4.9; + CHECK(et22->LouvresClosed()); + et22->Compressor = 5.0; + CHECK_FALSE(et22->LouvresClosed()); + + vehicle given{definition::fiz("et22_v3/201e-w").set("Cntrl", "LouvresOpenPressure", 4.0)}; + given->Compressor = 4.5; + CHECK_FALSE(given->LouvresClosed()); + given->Compressor = 3.9; + CHECK(given->LouvresClosed()); +} diff --git a/vehicle/Train.cpp b/vehicle/Train.cpp index 2926d74fc..6a1e9f4a1 100644 --- a/vehicle/Train.cpp +++ b/vehicle/Train.cpp @@ -9112,6 +9112,7 @@ bool TTrain::Update(double const Deltatime) btLampkaEngineOverheat.Turn(mvControlled->dizel_heat.engine_is_hot); btLampkaMotorBlowers.Turn(mvControlled->MotorBlowers[end::front].is_active && mvControlled->MotorBlowers[end::rear].is_active); btLampkaCoolingFans.Turn(mvControlled->RventRot > 1.0); + btLampkaLouvresClosed.Turn(mvControlled->LouvresClosed()); btLampkaTempomat.Turn(mvOccupied->SpeedCtrlUnit.IsActive); btLampkaDistanceCounter.Turn(m_distancecounter >= 0.f); // universal devices state indicators @@ -9198,6 +9199,7 @@ bool TTrain::Update(double const Deltatime) btLampkaMalfunction.Turn(false); btLampkaMotorBlowers.Turn(false); btLampkaCoolingFans.Turn(false); + btLampkaLouvresClosed.Turn(false); btLampkaTempomat.Turn(false); btLampkaDistanceCounter.Turn(false); // universal devices state indicators @@ -11213,6 +11215,7 @@ void TTrain::clear_cab_controls() btLampkaMalfunctionB.Clear(); btLampkaMotorBlowers.Clear(); btLampkaCoolingFans.Clear(); + btLampkaLouvresClosed.Clear(); btLampkaTempomat.Clear(); btLampkaDistanceCounter.Clear(); @@ -11577,6 +11580,7 @@ bool TTrain::initialize_button(cParser &Parser, std::string const &Label, int co {"i-vent_trim:", btLampkaWentZaluzje}, {"i-motorblowers:", btLampkaMotorBlowers}, {"i-coolingfans:", btLampkaCoolingFans}, + {"i-louvresclosed:", btLampkaLouvresClosed}, {"i-tempomat:", btLampkaTempomat}, {"i-distancecounter:", btLampkaDistanceCounter}, {"i-trainheating:", btLampkaOgrzewanieSkladu}, diff --git a/vehicle/Train.h b/vehicle/Train.h index df5dcfb76..b2cc84f46 100644 --- a/vehicle/Train.h +++ b/vehicle/Train.h @@ -815,6 +815,7 @@ public: // reszta może by?publiczna TButton btLampkaMalfunctionB; TButton btLampkaMotorBlowers; TButton btLampkaCoolingFans; + TButton btLampkaLouvresClosed; // ET22, the pneumatic louvres of the motor fans not open yet TButton btLampkaTempomat; TButton btLampkaDistanceCounter;