mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-09 05:54:43 +01:00
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.