mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-01 22:07:55 +01:00
c07eb76e51
What a vehicle does in the step of its traction depended on a switch on
EngineType in each place: the traction force, the ventilators, the power of
the engine, the ammeters, the revolutions of the engine. Each kind of drive
is now a class of its own in physics/mover/drive.h/.cpp, behind the
interface TractionDrive:
NoDrive no engine, or one with no model (steam, Main)
DumbDrive an engine with no model (Dumb)
WheelsDrivenDrive the wheels driven by hand
SeriesMotorDrive series wound DC motors
InductionMotorDrive asynchronous motors and inverters
DieselMechanicalDrive a diesel engine and a mechanical or hydraulic gear
DieselElectricDrive a diesel engine, a generator and traction motors
TMoverParameters::Drive() gives the one of the vehicle's EngineType.
TractionForce(), UpdateVentilators(), UpdateEnginePower(), ShowCurrent(),
EngineRPMRatio(), EngineIdleRPM() and EngineMaxRPM() call it in the same
order the switches went. The drives hold no state yet: the state of each
drive moves into its class next.
No change in behaviour: 1144/1144 tests, golden traces exact against staging
62f7a29b.