mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-19 00:02:08 +08:00
119e175978
The raw SIDE_DETECT_STATE bit lit the mirrors and UI for cars two lanes over and for far-ahead traffic, because it has no lane discrimination. Gate it on a front-radar track actually in the adjacent lane (LONG<15m, 1.9<=|LAT|<=5.5m), latched while side-detect stays asserted with a 0.5s release debounce and 1s track-near memory, computed in carstate so the UI path, lane-change veto, and mirror/cluster spoof all consume the same gated signal. card stashes track adjacency from RadarData; fails open to the raw bit if the stash goes stale. Validated on onelane/twolanes/ trafficonleft/standstillmirror rlogs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>