18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-01 18:47:06 +01:00

refactor(physics): the low voltage, the train heating and the electrodynamic brake as components

The rest of the electrics of physics::Vehicle beside the traction motors
becomes components, with English names:

  lowVoltage (LowVoltageSupply,   Battery batteryOn, BatteryVoltage,
  physics/components/lowvoltage.h) NominalBatteryVoltage, BatteryStart,
                                  Power110vIsAvailable / Power24vIsAvailable /
                                  Power24vVoltage power110vAvailable /
                                  power24vAvailable / power24vVoltage, the
                                  battery button of the cab: batteryButtonFired,
                                  batteryButtonImpulse, batteryButtonHeld,
                                  batteryButtonHoldTime
  trainHeating (TrainHeating)     Heating on, HeatingAllow allow,
                                  HeatingSwitchImpulse switchImpulse,
                                  HeatingPower power, EngineHeatingRPM engineRpm
  brakes.electrodynamic           the DynamicBrake* fields: type, ammeters,
  (ElectrodynamicBrake,           controllerPositions, controllerPosition,
  physics/components/braking.h)   resistance(1, 2), on, emuWorking;
                                  SplitEDPneumaticBrake splitFromPneumatic;
                                  the fans of the braking resistor (BRVentilators,
                                  BRVto, BRVtimer, Imaxrpc): resistorFansRunning,
                                  resistorFansSustain, resistorFansTimer,
                                  resistorPassiveMaxCurrent

The diesel-electric dynamic brake (DEDynamicBrake) and the currents of the
traction circuit (Im, Itot, EngineVoltage ...) stay for the traction stage.

No string literal changed (checked over all the changed files).

No change in behaviour: 1149/1149 tests, golden traces exact against staging
62f7a29b.
This commit is contained in:
2026-11-29 03:15:56 +01:00
parent 1bea280010
commit 89258eb72c
62 changed files with 501 additions and 462 deletions
+4 -4
View File
@@ -41,9 +41,9 @@ bool physics::Vehicle::CheckLocomotiveParameters(bool ReadyFlag, int /*Dir*/)
AutoRelayFlag = AutoRelayType == 1;
if (NominalBatteryVoltage == 0.0)
if (lowVoltage.nominalBatteryVoltage == 0.0)
{
BatteryStart = start_t::disabled;
lowVoltage.batteryStart = start_t::disabled;
}
Sand = SandCapacity;
@@ -111,7 +111,7 @@ bool physics::Vehicle::CheckLocomotiveParameters(bool ReadyFlag, int /*Dir*/)
{
HeatingPowerSource.SourceType = TPowerSource::Main;
}
if (HeatingPowerSource.SourceType == TPowerSource::NotDefined && HeatingPower > 0)
if (HeatingPowerSource.SourceType == TPowerSource::NotDefined && trainHeating.power > 0)
{
HeatingPowerSource.SourceType = TPowerSource::PowerCable;
HeatingPowerSource.PowerType = TPowerType::ElectricPower;
@@ -441,7 +441,7 @@ void physics::Vehicle::SetReadyToDepart()
DirAbsolute = DirActive * CabActive; // kierunek jazdy względem sprzęgów
brakes.pipeLimiterPressure = brakes.controlReservoirPressure;
Battery = BatteryStart != start_t::disabled;
lowVoltage.batteryOn = lowVoltage.batteryStart != start_t::disabled;
}
// the air and the brakes of a vehicle standing braked