18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-02 21:15:20 +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:
2026-11-29 13:39:07 +01:00
parent f0978c36c7
commit 23b695752a
23 changed files with 76 additions and 73 deletions
+2 -2
View File
@@ -311,8 +311,8 @@ void TDynamicObject::updateDriver( double const dt1 )
physics->CheckEIMIC(dt1);
if (physics->SpeedCtrl())
physics->CheckSpeedCtrl(dt1);
physics->eimic_real = std::min(physics->eimic,physics->eimicSpeedCtrl());
physics->SendCtrlToNext(VehicleCommand::integratedController, physics->eimic_real, physics->CabActive);
physics->SetEimicReal(std::min(physics->eimic,physics->eimicSpeedCtrl()));
physics->SendCtrlToNext(VehicleCommand::integratedController, physics->EimicReal(), physics->CabActive);
}
if( Mechanik->primary()
&& physics->EngineType == TEngineType::ElectricInductionMotor ) {