17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-09 05:54:43 +01:00
Files
maszyna/McZapkie
jerrrrycho 7e426192b7 fix(cab): a diesel with only the starter button stops its engine with the main switch off command (eu07/maszyna#427)
The SM03 had no way to stop its engine. Its fuel pump starts on its own, so the fuel pump switch is ignored; the
engine runs the converter feeding the low voltage circuit, so the battery switch doesn't starve the fuel pump either;
and its cab has only the starter button, for which TTrain::OnCommand_linebreakeropen() kept a legacy branch which
animated the button and returned without opening the circuit. MainSwitch(false) itself stops the engine fine.

The command now opens the circuit on diesels whose cab has only the starter button
(TMoverParameters::MainCircuitOpensWithStarterOnly()), without animating the button, which held down would start
the engine again. Other vehicles with only the button closing the circuit keep ignoring the command.

Tests: tests/unit/test_engine_shutdown.cpp, on a shunter made after the SM03.
2026-11-07 14:06:38 +01:00
..
2026-11-07 12:37:12 +01:00
2026-10-11 20:42:09 +02:00