mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-19 01:46:01 +01:00
fix: EN57 brakes hauled with the brake hose alone, Knorr EP brake without control power
eu07/maszyna#87: the EP2 (and EP1) valve charged its auxiliary reservoir only from the main reservoir pipe. A dead EN57 hauled by a locomotive coupled with the hook and the brake hose alone ("3") never charged it, its control reservoir stopped at about 2.5 bar and the unit didn't brake. The valve now refills the auxiliary reservoir from the brake pipe through the slide valve's check valve, as every ESt does (TESt::FillBrakeRes, shared with TESt::GetPF, which stays bit for bit the same). With the main reservoir pipe charged the auxiliary reservoir stays above the brake pipe and nothing changes; the reservoir now also takes air from the brake pipe while it is below it, e.g. at start-up before the compressor has charged the main reservoir pipe. eu07/maszyna#134: the EP brake of the Knorr St113 handle (EN57-001) worked with the reverser in neutral, the battery off or the EP fuse switched off (Ctrl+Z). It now needs the control powered, as the Oerlikon handle's does (EPBrakeControlPowered: battery, reverser out of neutral, EP fuse), and an EP brake switched on drops out (holding the cylinder pressure) when the control loses power. The positions of the EP release and brake were already moved by 810b7ad07; a test pins them. No change to game data needed.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "stdafx.h"
|
||||
#include "doctest.h"
|
||||
#include "vehicle.h"
|
||||
#include "consist.h"
|
||||
|
||||
using test::definition;
|
||||
using test::vehicle;
|
||||
@@ -91,3 +92,48 @@ TEST_CASE("brakes: service braking stops a heavier wagon too") {
|
||||
wagon.run(40.0 /* s */, test::track{0.15 /* friction */, 0.0 /* gradient */});
|
||||
CHECK(std::abs(wagon.speed()) < 0.1);
|
||||
}
|
||||
|
||||
// eu07/maszyna#87: the ESt4d of the EN57's EP2 valve charged its auxiliary reservoir from the main reservoir pipe
|
||||
// alone, so a dead unit hauled by a locomotive coupled with the hook and the brake hose ("3") never charged it,
|
||||
// its control reservoir stopped half way, and it didn't brake. Like every ESt, it charges from the brake pipe too
|
||||
TEST_CASE("brakes: a dead EN57 hauled with the brake hose alone charges from the brake pipe and brakes") {
|
||||
test::consist train;
|
||||
auto &locomotive{train.add(definition::fiz("sm42_v1/6d1"))};
|
||||
train.add(definition::fiz("en57_v1/5bgb"), 0, coupling::coupler | coupling::brakehose);
|
||||
train.add(definition::fiz("en57_v1/6ba_840"));
|
||||
train.add(definition::fiz("en57_v1/5bgaiii_led_spot"));
|
||||
// a unit standing dead: no air anywhere, nothing in its main reservoir pipe
|
||||
for (std::size_t i = 1; i < train.size(); ++i) {
|
||||
auto &car{train[i].mover()};
|
||||
REQUIRE(car.BrakeValve == TBrakeValve::EP2);
|
||||
car.Hamulec->ForceEmptiness();
|
||||
car.Pipe->CreatePress(0.0);
|
||||
car.Pipe->Act();
|
||||
car.Pipe2->CreatePress(0.0);
|
||||
car.Pipe2->Act();
|
||||
car.CompressedVolume = 0.0;
|
||||
}
|
||||
locomotive.hold_brake_pipe(5.0);
|
||||
train.run(900.0);
|
||||
for (std::size_t i = 1; i < train.size(); ++i) {
|
||||
CAPTURE(i);
|
||||
auto &car{train[i].mover()};
|
||||
REQUIRE(car.ScndPipePress < 0.1); // no main reservoir pipe
|
||||
CHECK(car.Hamulec->GetBRP() > 4.8);
|
||||
CHECK(car.Hamulec->GetCRP() > 4.8);
|
||||
CHECK(car.BrakePress < 0.1);
|
||||
}
|
||||
// a full service application brakes the unit, and it releases again
|
||||
locomotive.hold_brake_pipe(3.5);
|
||||
train.run(20.0);
|
||||
for (std::size_t i = 1; i < train.size(); ++i) {
|
||||
CAPTURE(i);
|
||||
CHECK(train[i]->BrakePress > 2.0);
|
||||
}
|
||||
locomotive.hold_brake_pipe(5.0);
|
||||
train.run(60.0);
|
||||
for (std::size_t i = 1; i < train.size(); ++i) {
|
||||
CAPTURE(i);
|
||||
CHECK(train[i]->BrakePress < 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user