cleanup: remove dead CarCruiseDisplayActual param

Audit of post-fork param additions found CarCruiseDisplayActual was
written every CAN cycle (gated) but only consumed by hyundaicanfd.py::
create_buttons_alt, which has `return` on line 1 and no active callers.
Write was pure waste. Removed registration, write path, cache field,
and the dead read.

Also dropped the now-unused `from openpilot.common.params import Params`
in hyundaicanfd.py.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-16 22:03:01 -05:00
parent ef4e02e354
commit 22ced0c558
3 changed files with 2 additions and 11 deletions
+1 -6
View File
@@ -51,7 +51,6 @@ class CarState(CarStateBase):
# CLEARPILOT: cache to avoid per-cycle atomic writes to /dev/shm (eats CPU via fsync/flock)
self._prev_car_speed_limit = None
self._prev_car_is_metric = None
self._prev_car_cruise_display = None
self.cruise_info = {}
@@ -223,11 +222,7 @@ class CarState(CarStateBase):
if self.is_metric != self._prev_car_is_metric:
self.params_memory.put("CarIsMetric", "1" if self.is_metric else "0")
self._prev_car_is_metric = self.is_metric
car_cruise_display = cp_cruise.vl["SCC11"]["VSetDis"]
if car_cruise_display != self._prev_car_cruise_display:
self.params_memory.put_float("CarCruiseDisplayActual", car_cruise_display)
self._prev_car_cruise_display = car_cruise_display
return ret