mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-09 18:32:05 +08:00
7a43e2cb67
The `steer_limited_by_safety` update in `publish()` is gated by `selfdriveState.active`, which is False during MADS lateral-only control. This causes the flag to never update once cruise deactivates — it stays stuck at whatever value it had during the last ramp-up (typically True), permanently suppressing the saturation timer in `_check_saturation` and preventing the "Turn Exceeds Steering Limit" alert from firing. Use `CC.latActive` instead, which already accounts for MADS via `get_lat_active()` in ControlsExt. Bug was introduced in #446 (MADS), which updated `CC.latActive` to use `mads.active` but missed updating the `steer_limited_by_safety` gate in `publish()`.