18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-23 04:36:18 +01:00

fix: review of the separate engine start switches (eu07/maszyna#80)

- initialise the cooling power read from the .fiz to its default, no division by an indeterminate value
- integer step counters in the engine start tests
- main_sw opening the consist turns the two-state mainb_sw / mainc_sw off too, left on they'd start the engines again
- the doc comment of MainCircuitOpensWithStarterOnly() back on it; the .fiz read is the controlled vehicle's
This commit is contained in:
jerrrrycho
2026-11-08 17:38:59 +01:00
parent 46e0628fbe
commit 91e0d90e8d
5 changed files with 31 additions and 13 deletions

View File

@@ -2475,15 +2475,15 @@ class TMoverParameters
}
return false == StLinFlag && MainCircuitLampsEnabled();
}
// whether the cab command opening the main circuit opens it where the only cab switch of the circuit is the button
// closing it: on a diesel that's the starter button, and the command is the one way to stop an engine whose fuel pump
// starts on its own (eu07/maszyna#427). the other vehicles with such a button keep ignoring the command
// the vehicles the line breaker / engine start switch of this vehicle works, and its engine stopping on its own
// stops: the whole consist, or with JointEngineStart=No this vehicle alone (eu07/maszyna#80)
range_t MainSwitchRange() const
{
return JointEngineStart ? range_t::consist : range_t::local;
}
// whether the cab command opening the main circuit opens it where the only cab switch of the circuit is the button
// closing it: on a diesel that's the starter button, and the command is the one way to stop an engine whose fuel pump
// starts on its own (eu07/maszyna#427). the other vehicles with such a button keep ignoring the command
bool MainCircuitOpensWithStarterOnly() const
{
return EngineType == TEngineType::DieselEngine || EngineType == TEngineType::DieselElectric;

View File

@@ -11394,7 +11394,7 @@ void TMoverParameters::LoadFIZ_Engine(std::string const &Input)
// water heater
extract_value(WaterHeater.config.temp_min, "HeaterMinTemperature", Input, "");
extract_value(WaterHeater.config.temp_max, "HeaterMaxTemperature", Input, "");
float pf;
float pf{ 1235.f };
extract_value(pf, "NominalCoolingPower", Input, "1235");
dizel_heat.powerfactor = 1235 / pf;
}