mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-02 16:36:53 +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:
@@ -243,13 +243,13 @@ double vehicle::move(track const &Track, double Dt, TLocation const &Location, d
|
||||
if (physics.SpeedCtrl()) {
|
||||
physics.CheckSpeedCtrl(Dt);
|
||||
}
|
||||
physics.eimic_real = std::min(physics.eimic, physics.eimicSpeedCtrl());
|
||||
physics.SetEimicReal(std::min(physics.eimic, physics.eimicSpeedCtrl()));
|
||||
}
|
||||
if (physics.EngineType == ElectricInductionMotor) {
|
||||
// the share of the electric and pneumatic brake over the train (TDynamicObject's MED) isn't here
|
||||
physics.CheckEIMIC(Dt);
|
||||
physics.CheckSpeedCtrl(Dt);
|
||||
physics.eimic_real = std::min(physics.eimic, physics.eimicSpeedCtrl());
|
||||
physics.SetEimicReal(std::min(physics.eimic, physics.eimicSpeedCtrl()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user