02f25f83c4
create_steering_messages was constructing a new Params("/dev/shm/params")
object and reading no_lat_lane_change on every CAN steering message build
— i.e. 100 allocations + 100 file reads per second. Now the Params
instance lives on CarController, and the value is read once per update()
cycle and passed as a parameter.
Audited all other hyundai CAN-FD integration code for similar patterns:
- carstate.py — already fixed (previous commit)
- carcontroller.py — other Params references are all in commented-out code
- hyundaicanfd.py::create_buttons_alt — dead code (early return), so the
Params read there never executes; left as-is
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Car port structure
interface.py
Generic interface to send and receive messages from CAN (controlsd uses this to communicate with car)
fingerprints.py
Fingerprints for matching to a specific car
carcontroller.py
Builds CAN messages to send to car
carstate.py
Reads CAN from car and builds openpilot CarState message
values.py
Limits for actuation, general constants for cars, and supported car documentation
radar_interface.py
Interface for parsing radar points from the car