18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-27 21:45:16 +01:00
Commit Graph

1 Commits

Author SHA1 Message Date
jerrrrycho
4d12693376 AI: say so when standing with the pantographs up and no voltage (#344)
* fix(ai): the driver tells of standing with its pantographs up and no voltage

An AI driver of an electric vehicle standing past the end of the overhead
wire, or under a wire switched off, never gets out of Prepare_engine: the
voltage PrepareEngine() waits for doesn't come. It waited without a word
(eu07/maszyna#421, L053 poranek with an ET21 on TME222158). Now it says so in
the log, once per episode, with the vehicle's name and position, telling a
missing wire (no raised pantograph found one) from a wire without voltage.
It keeps trying, so towed back under the wire or with the power switched on
the vehicle still gets prepared.

The decision is ai_power (vehicle/aipower), in the core library with unit
tests; scenario case et21_td_no_wire_reports puts an ET21 on a track of its
own with no wire next to td.scn.

* refactor(ai): the power stall report without Sonar issues

stall::none becomes stall::not_stalled (none shadowed a global
enumerator), using enum in check(), and an explicit cast of the
pantograph count. No change in behaviour.

* fix(ai): the power stall report is a traction log line

It went out as a generic error, so a scenery that keeps its wire off on
purpose couldn't mute it with logs.filter like the other traction lines.
2026-11-25 06:15:09 +01:00