mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-02 08:09:14 +01:00
CabActivisation() sent DirAbsolute under the "Direction" command, while DirectionForward() and DirectionBackward() send DirActive under the same name. The receiving end (TMoverParameters::RunInternalCommand) assigns the value straight to DirActive and derives DirAbsolute from its own CabActive, so the two senders only agree while CabActive is 1. Activating a rear cab therefore left every other member of the consist with the reverser set the opposite way. The symptom was an EMU that stalled and then accelerated backwards after control changed hands. It was intermittent because the reverser sweep in sync_consist_reversers() normally repairs the members through the other two call sites - except on an EZT, where the first DirectionBackward() at DirActive 1 is consumed by the high-current switch and propagates nothing, leaving the state set by CabActivisation() in place. Seen on an EN57 driven from the rear cab: the occupied car held DirActive 1 with CabActive -1, the motor car and the far cab held DirActive -1 with the same CabActive, so their DirAbsolute came out inverted.