18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-15 23:24:11 +01:00
Commit Graph

1 Commits

Author SHA1 Message Date
jerrrrycho
19b500f9be fix(lights): darken the coupled end with the light programmer from either cab (eu07/maszyna#395)
SetLights() gives RaLightsSet() the lights for the vehicle's end towards
the head of the consist and the end towards its tail, whichever way the
occupied cab faces. The coupling that switches an end off was looked up
at the opposite end whenever the cab faced the tail of the consist
(e.g. 6Dg driven from its second cab position), so the free end went
dark and the end with the train was lit.

The per-vehicle choice moves to lights_programmer::vehicle_lights() in
vehicle/lightsprogrammer.h, which checks the coupling at the same end
it lights, with unit tests for both cabs, both orientations and the
train at either end. Driving from a cab facing the head of the consist
gives the same lights as before. No data change needed.
2026-11-07 17:58:20 +01:00