Files
clearpilot/selfdrive
brianhansonxyz 1e4e95ca6b controlsd: longer park-grace cap + 3s suppression on engage attempt
Two-part fix for the alert burst on first engage:

1. Park-exit grace cap 8s -> 15s. The cold-spawn chain (modeld load
   thneed -> publish modelV2 -> plannerd publish longitudinalPlan ->
   frogpilot_process publish frogpilotPlan) often takes more than 8s,
   so the previous cap let commIssue start firing right when the user
   was trying to engage.

2. Track CS.cruiseState.enabled rising edge as last_engage_attempt_frame
   (separate from last_engaged_frame which only fires on successful
   transition into ENABLED_STATES). Suppress both controlsdLagging and
   commIssue events for the first 3s after either edge.

   Why two edges: NO_ENTRY alerts fire on engage *attempt* (before
   self.enabled flips), so the post-success grace alone doesn't cover
   the case where the user presses SET and gets blocked. Tracking the
   cruise-enabled rising edge in update_events (using self.CS_prev)
   catches that.

Result: pressing SET no longer pops "Controls Process Lagging: Reboot
Your Device" or "Communication Issue Between Processes" for the brief
window between the engage attempt and services settling. Real lag /
comm issues that persist beyond 3s still alert normally.
2026-05-04 20:03:06 -05:00
..