mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-02 17:46:48 +01:00
refactor(physics): the demand of the integrated controller is private to the vehicle
eimic_real, the demand of the integrated controller the vehicle goes by with
the speed control counted, which TDynamicObject and the consist braking set
for the vehicle that leads, is private: EimicReal() and SetEimicReal(). The
field of the same name of drivingaid::input stays as it is.
No change in behaviour: the golden traces recorded on dfb43c4f match bit for bit.
This commit is contained in:
@@ -93,7 +93,7 @@ TEST_CASE("diesel: the 214M railbus's torque converter, gears and retarder") {
|
||||
scenario.get_going();
|
||||
scenario.full_power(60.0);
|
||||
CHECK(railbus.MainCtrlPos() == 5);
|
||||
CHECK(railbus.eimic_real == doctest::Approx(1.0));
|
||||
CHECK(railbus.EimicReal() == doctest::Approx(1.0));
|
||||
CHECK(railbus.torqueConverter.lockedUp);
|
||||
CHECK(railbus.ScndCtrlActualPos == railbus.ScndCtrlPosNo());
|
||||
struct position {
|
||||
@@ -108,7 +108,7 @@ TEST_CASE("diesel: the 214M railbus's torque converter, gears and retarder") {
|
||||
scenario.act(std::format("position {}", number));
|
||||
railbus.DecMainCtrl(1);
|
||||
scenario.wait(8.0);
|
||||
CHECK(railbus.eimic_real == doctest::Approx(eimic));
|
||||
CHECK(railbus.EimicReal() == doctest::Approx(eimic));
|
||||
CHECK((railbus.retarder.fill > 0.99) == retarder);
|
||||
CHECK((railbus.retarder.torque > 1000.0) == retarder);
|
||||
CHECK((railbus.brakes.cylinderPressure > 2.0) == air);
|
||||
@@ -159,7 +159,7 @@ TEST_CASE("diesel: the 214M railbus's speed control, up to the speed of a button
|
||||
railbus.SpeedCtrlButton(2);
|
||||
scenario.wait(5.0);
|
||||
// the retarder does it at this speed, the air isn't needed
|
||||
CHECK(railbus.eimic_real == doctest::Approx(-1.0));
|
||||
CHECK(railbus.EimicReal() == doctest::Approx(-1.0));
|
||||
CHECK(railbus.retarder.fill == doctest::Approx(1.0));
|
||||
CHECK(railbus.brakes.cylinderPressure < 0.1);
|
||||
CHECK_FALSE(railbus.SpeedCtrlUnit.BrakeInterventionBraking);
|
||||
|
||||
Reference in New Issue
Block a user