mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-21 22:34:58 +01:00
feat: ET22 louvre lamp, lit until the main reservoir opens the louvres (eu07/maszyna#451)
The ET22 cab binds its louvre lamp to i-voltbrake: (voltage on the brake controller) as a stand-in. The real lamp goes out once the main compressors have filled the main reservoir to about 5 bar and the pneumatic louvres of the motor fans open. - New optional lamp i-louvresclosed:, lit (with low voltage power) while the main reservoir pressure is below LouvresOpenPressure. - New optional Cntrl. key LouvresOpenPressure [bar], 5.0 by default, so the .mmd change alone is enough. - i-vent_trim: (btLampkaWentZaluzje, never driven) is left alone, because the WMB10 binds it and would suddenly light up. SVN data, to change once this is released (old data works as before): - dynamic/pkp/et22_v3/201eo.mmd.inc, 201eo_160ec.mmd.inc, 201ek.mmd: i-voltbrake: lampka_zaluzje -> i-louvresclosed: lampka_zaluzje - dynamic/pkp/et22-2000_v2/201em.mmd: i-voltbrake: zaluzje -> i-louvresclosed: zaluzje (eu07/maszyna#451)
This commit is contained in:
@@ -2163,6 +2163,7 @@ class TMoverParameters
|
|||||||
bool StLinFlag = false; /*!o styczniki liniowe*/
|
bool StLinFlag = false; /*!o styczniki liniowe*/
|
||||||
bool StLinSwitchOff{false}; // state of the button forcing motor connectors open
|
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
|
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*/
|
bool ResistorsFlag = false; /*!o jazda rezystorowa*/
|
||||||
double RventRot = 0.0; /*!s obroty wentylatorow rozruchowych*/
|
double RventRot = 0.0; /*!s obroty wentylatorow rozruchowych*/
|
||||||
double PantographVoltage{0.0}; // voltage supplied to pantographs
|
double PantographVoltage{0.0}; // voltage supplied to pantographs
|
||||||
@@ -2477,6 +2478,11 @@ class TMoverParameters
|
|||||||
{
|
{
|
||||||
return false == StLinFlag && MainCircuitLampsEnabled();
|
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
|
// whether the devices the line contactors are interlocked with (LineContactorsInterlock) let them close
|
||||||
bool LineContactorsInterlockReleased() const;
|
bool LineContactorsInterlockReleased() const;
|
||||||
// whether the pumps a joint oil and fuel pump switch works, those not started automatically, are all switched on
|
// whether the pumps a joint oil and fuel pump switch works, those not started automatically, are all switched on
|
||||||
|
|||||||
@@ -11022,6 +11022,7 @@ void TMoverParameters::LoadFIZ_Cntrl(std::string const &line)
|
|||||||
auto lookup = interlocks.find(extract_value("LineContactorsInterlock", line));
|
auto lookup = interlocks.find(extract_value("LineContactorsInterlock", line));
|
||||||
LineContactorsInterlock = lookup != interlocks.end() ? lookup->second : line_contactors_interlock::none;
|
LineContactorsInterlock = lookup != interlocks.end() ? lookup->second : line_contactors_interlock::none;
|
||||||
}
|
}
|
||||||
|
extract_value(LouvresOpenPressure, "LouvresOpenPressure", line, "");
|
||||||
// compartment lights
|
// compartment lights
|
||||||
{
|
{
|
||||||
auto lookup = starts.find(extract_value("CompartmentLightsStart", line));
|
auto lookup = starts.find(extract_value("CompartmentLightsStart", line));
|
||||||
|
|||||||
@@ -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
|
// 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.
|
// 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::definition;
|
||||||
using test::vehicle;
|
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_FALSE(rear.StLinFlag);
|
||||||
CHECK(front.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());
|
||||||
|
}
|
||||||
|
|||||||
@@ -9112,6 +9112,7 @@ bool TTrain::Update(double const Deltatime)
|
|||||||
btLampkaEngineOverheat.Turn(mvControlled->dizel_heat.engine_is_hot);
|
btLampkaEngineOverheat.Turn(mvControlled->dizel_heat.engine_is_hot);
|
||||||
btLampkaMotorBlowers.Turn(mvControlled->MotorBlowers[end::front].is_active && mvControlled->MotorBlowers[end::rear].is_active);
|
btLampkaMotorBlowers.Turn(mvControlled->MotorBlowers[end::front].is_active && mvControlled->MotorBlowers[end::rear].is_active);
|
||||||
btLampkaCoolingFans.Turn(mvControlled->RventRot > 1.0);
|
btLampkaCoolingFans.Turn(mvControlled->RventRot > 1.0);
|
||||||
|
btLampkaLouvresClosed.Turn(mvControlled->LouvresClosed());
|
||||||
btLampkaTempomat.Turn(mvOccupied->SpeedCtrlUnit.IsActive);
|
btLampkaTempomat.Turn(mvOccupied->SpeedCtrlUnit.IsActive);
|
||||||
btLampkaDistanceCounter.Turn(m_distancecounter >= 0.f);
|
btLampkaDistanceCounter.Turn(m_distancecounter >= 0.f);
|
||||||
// universal devices state indicators
|
// universal devices state indicators
|
||||||
@@ -9198,6 +9199,7 @@ bool TTrain::Update(double const Deltatime)
|
|||||||
btLampkaMalfunction.Turn(false);
|
btLampkaMalfunction.Turn(false);
|
||||||
btLampkaMotorBlowers.Turn(false);
|
btLampkaMotorBlowers.Turn(false);
|
||||||
btLampkaCoolingFans.Turn(false);
|
btLampkaCoolingFans.Turn(false);
|
||||||
|
btLampkaLouvresClosed.Turn(false);
|
||||||
btLampkaTempomat.Turn(false);
|
btLampkaTempomat.Turn(false);
|
||||||
btLampkaDistanceCounter.Turn(false);
|
btLampkaDistanceCounter.Turn(false);
|
||||||
// universal devices state indicators
|
// universal devices state indicators
|
||||||
@@ -11213,6 +11215,7 @@ void TTrain::clear_cab_controls()
|
|||||||
btLampkaMalfunctionB.Clear();
|
btLampkaMalfunctionB.Clear();
|
||||||
btLampkaMotorBlowers.Clear();
|
btLampkaMotorBlowers.Clear();
|
||||||
btLampkaCoolingFans.Clear();
|
btLampkaCoolingFans.Clear();
|
||||||
|
btLampkaLouvresClosed.Clear();
|
||||||
btLampkaTempomat.Clear();
|
btLampkaTempomat.Clear();
|
||||||
btLampkaDistanceCounter.Clear();
|
btLampkaDistanceCounter.Clear();
|
||||||
|
|
||||||
@@ -11577,6 +11580,7 @@ bool TTrain::initialize_button(cParser &Parser, std::string const &Label, int co
|
|||||||
{"i-vent_trim:", btLampkaWentZaluzje},
|
{"i-vent_trim:", btLampkaWentZaluzje},
|
||||||
{"i-motorblowers:", btLampkaMotorBlowers},
|
{"i-motorblowers:", btLampkaMotorBlowers},
|
||||||
{"i-coolingfans:", btLampkaCoolingFans},
|
{"i-coolingfans:", btLampkaCoolingFans},
|
||||||
|
{"i-louvresclosed:", btLampkaLouvresClosed},
|
||||||
{"i-tempomat:", btLampkaTempomat},
|
{"i-tempomat:", btLampkaTempomat},
|
||||||
{"i-distancecounter:", btLampkaDistanceCounter},
|
{"i-distancecounter:", btLampkaDistanceCounter},
|
||||||
{"i-trainheating:", btLampkaOgrzewanieSkladu},
|
{"i-trainheating:", btLampkaOgrzewanieSkladu},
|
||||||
|
|||||||
@@ -815,6 +815,7 @@ public: // reszta może by?publiczna
|
|||||||
TButton btLampkaMalfunctionB;
|
TButton btLampkaMalfunctionB;
|
||||||
TButton btLampkaMotorBlowers;
|
TButton btLampkaMotorBlowers;
|
||||||
TButton btLampkaCoolingFans;
|
TButton btLampkaCoolingFans;
|
||||||
|
TButton btLampkaLouvresClosed; // ET22, the pneumatic louvres of the motor fans not open yet
|
||||||
TButton btLampkaTempomat;
|
TButton btLampkaTempomat;
|
||||||
TButton btLampkaDistanceCounter;
|
TButton btLampkaDistanceCounter;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user