Files
MoreTore/opendbc_repo
whoisdomi 39afadb95f IONIQ
UI Build

LKAS engage/disengage sound

It will now make the same sound as op engage/disengage

Wheel Control fix 2

build

Feature: Model Name on Developer Sidebar

Model Name port and correct DEVELOPER_SIDEBAR_METRICS slot numbering

Wheel Controls button fixes

Mode/Star buttons were not showing on desk
LKAS option was showing even when car was using it for AOL, not it hides it if being used for AOL

MapGears Sync Accel/Decel on UI

MapGears will sync with "Longitudinal Tuning" UI to show chosen accel/decel profile to match with chosen drive mode.

Drive mode -> accel/decel profile mapping.
Eco → Eco
Normal → Standard
Sport → Sport+/Sport

Writes on gear state change, gated on MapAcceleration/MapDeceleration toggles independently

ECU Disable and Auto long/exp check

ECU Disable and Auto long/exp check

compile

Star and Mode buttons to wheel control options

cereal/custom.capnp — Added modePressed @16 and customPressed @17 fields to StarPilotCarState

opendbc_repo/opendbc/car/hyundai/carstate.py — Added STEERING_WHEEL_MEDIA_BUTTONS (50Hz) to the CANFD CAN parser, initialized mode_button/custom_button state, and set fp_ret.modePressed/fp_ret.customPressed in update_canfd()

common/params_keys.h — Added 6 new params: ModeButtonControl, LongModeButtonControl, VeryLongModeButtonControl, StarButtonControl, LongStarButtonControl, VeryLongStarButtonControl

starpilot/common/starpilot_variables.py — Added full short/long/very-long toggle processing for both Mode and Star buttons (gated on HyundaiFlags.CANFD), with has_canfd_media_buttons flag propagated to toggles

starpilot/controls/starpilot_card.py — Added Mode and Star button press counters and short/long/very-long press event handling, mirroring the existing distance button logic

selfdrive/ui/layouts/settings/starpilot/wheel.py — Added 6 new tiles for Mode/Star buttons (short, long, very long each), visible only when cs.isHKGCanFd is true

MapGears for HKG

Add HKG "Drive Modes" button ability to map to eco/normal/sport accel profiles.

Dashboard speed limit reading for CANFD

Add FR_CMR_02_100ms to CAN parsers in get_can_parsers_canfd: on ECAN (freq=10) for LKA_STEERING cars, on CAM (freq=0, optional) for all others
calculate_canfd_speed_limit and fp_ret.dashboardSpeedLimit assignment were already present
CAM bus uses freq=0 to avoid breaking canValid on non-LKA cars that don't have this message

CANFD steering limits

Raises STEER_MAX to 409
Speed-dependent deltas (DELTA_UP=10/DOWN=8 below 15 m/s, UP=2/DOWN=3 above),
Update panda safety ceiling and tests to match.
Removes TacoTuneHacks toggle dependency.

Ioniq 6 toml values update Updated toml values closer to learned values

DBC Update HKG Signals

Added 5 new messages to hyundai_canfd.dbc and hyundai_canfd_generated.dbc:

DRIVE_MODE_EV (0x205):
EV drive mode state with Normal/Eco/Sport (button) values. Can be used to change
acceleration profiles in openpilot based on drive mode.

CAM_0x361 (0x361):
Camera sign recognition with SIGN_TYPE and SIGN_TYPE_2 signals.
Dashboard Speed Limit. Can be used as source for SLC.

ADAS_0x380 (0x380):
ADAS stop sign detection bit. Dashboard stop sign alert.
Triggers 80-90ft before stop sign typically and can be used to help stopping for stop signs.

DOOR_LOCK (0x414):
Not actual command to lock/unlock, but may be used to detect lock state changes.

STEERING_WHEEL_MEDIA_BUTTONS (0x448):
Steering wheel button inputs (voice, phone, mode, next/prev, menu, scroll, custom)
Can be used to assign custom functions to steering wheel buttons in openpilot.

Targets Ioniq 6 but may apply to other Hyundai CAN FD vehicles.
2026-04-23 09:32:13 -05:00
..
2025-12-18 23:23:21 -08:00
2025-12-18 23:23:21 -08:00
2025-12-18 23:23:21 -08:00
2026-04-23 09:32:13 -05:00
2026-03-22 03:15:05 -05:00
2025-12-18 23:23:21 -08:00
2025-12-18 23:23:21 -08:00
2025-12-18 23:23:21 -08:00
2025-12-18 23:23:21 -08:00
2025-12-18 23:23:21 -08:00
2025-12-18 23:23:21 -08:00
2025-12-18 23:23:21 -08:00
2025-12-18 23:23:21 -08:00
2025-12-18 23:23:21 -08:00
2025-12-18 23:23:21 -08:00
2025-12-18 23:23:21 -08:00

opendbc

opendbc is a Python API for your car.
Control the gas, brake, steering, and more. Read the speed, steering angle, and more.

Docs · Contribute · Discord

License: MIT X Follow Discord


Most cars since 2016 have electronically-actuatable steering, gas, and brakes thanks to LKAS and ACC. The goal of this project is to support controlling the steering, gas, and brakes on every single one of those cars.

While the primary focus is on supporting ADAS interfaces for openpilot, we're also interested in reading and writing as many things as we can (EV charge status, lock/unlocking doors, etc) such that we can build the best vehicle management app ever.


This README and the supported cars list are all the docs for the opendbc project. Everything you need to know to use, contribute, and extend opendbc are in these docs.

Quick start

git clone https://github.com/commaai/opendbc.git
cd opendbc

# you probably just want to use this. it's an all-in-one for dependency
# installation, compiling, linting, and tests. it's also what runs in CI
./test.sh

# here are the individual commands it runs
pip3 install -e .[testing,docs]  # install dependencies
scons -j8                        # build with 8 cores
pytest .                         # run the tests
lefthook run lint                # run the linter

examples/ contains small example programs that can read state from the car and control the steering, gas, and brakes. examples/joystick.py allows you to control a car with a joystick.

Project Structure

  • opendbc/dbc/ is a repository of DBC files
  • opendbc/can/ is a library for parsing and building CAN messages from DBC files
  • opendbc/car/ is a high-level library for interfacing with cars using Python
  • opendbc/safety/ is the functional safety for all the cars supported by opendbc/car/

How to Port a Car

This guide covers everything from adding support to a new car all the way to improving existing cars (e.g. adding longitudinal control or radar parsing). If similar cars to yours are already compatible, most of this work is likely already done for you.

At its most basic, a car port will control the steering on a car. A "complete" car port will have all of: lateral control, longitudinal control, good tuning for both lateral and longitudinal, radar parsing (if equipped), fuzzy fingerprinting, and more. The new car support docs will clearly communicate each car's support level.

Connect to the Car

The first step is to get connected to the car with a comma four and a car harness. The car harness gets you connected to two different CAN buses and splits one of those buses to send our own actuation messages.

If you're lucky, a harness compatible with your car will already be designed and sold on comma.ai/shop. If you're not so lucky, start with a "developer harness" from comma.ai/shop and crimp on whatever connector you need.

Structure of a port

Depending on the brand, most of this basic structure will already be in place.

The entirety of a car port lives in opendbc/car/<brand>/:

  • carstate.py: parses out the relevant information from the CAN stream using the car's DBC file
  • carcontroller.py: outputs CAN messages to control the car
  • <brand>can.py: thin Python helpers around the DBC file to build CAN messages
  • fingerprints.py: database of ECU firmware versions for identifying car models
  • interface.py: high level class for interfacing with the car
  • radar_interface.py: parses out the radar
  • values.py: enumerates the brand's supported cars

Reverse Engineer CAN messages

Start off by recording a route with lots of interesting events: enable LKAS and ACC, turn the steering wheel both extremes, etc. Then, load up that route in cabana.

Tuning

Longitudinal

Use the longitudinal maneuvers report to evaluate your car's longitudinal control and tune it.

Contributing

All opendbc development is coordinated on GitHub and Discord. Check out the #dev-opendbc-cars channel and Vehicle Specific section.

Roadmap

Short term

Longer term

  • Extend support to every car with LKAS + ACC interfaces
  • Automatic lateral and longitudinal control/tuning evaluation
  • Auto-tuning for lateral and longitudinal control
  • Automatic Emergency Braking

Contributions towards anything here are welcome.

Safety Model

When a panda powers up with opendbc safety firmware, by default it's in SAFETY_SILENT mode. While in SAFETY_SILENT mode, the CAN buses are forced to be silent. In order to send messages, you have to select a safety mode. Some of safety modes (for example SAFETY_ALLOUTPUT) are disabled in release firmwares. In order to use them, compile and flash your own build.

Safety modes optionally support controls_allowed, which allows or blocks a subset of messages based on a customizable state in the board.

Code Rigor

The opendbc safety firmware is written for its use in conjunction with openpilot and panda. The safety firmware, through its safety model, provides and enforces the openpilot safety. Due to its critical function, it's important that the application code rigor within the safety folder is held to high standards.

These are the CI regression tests we have in place:

  • A generic static code analysis is performed by cppcheck.
  • In addition, cppcheck has a specific addon to check for MISRA C:2012 violations. See current coverage.
  • Compiler options are relatively strict: the flags -Wall -Wextra -Wstrict-prototypes -Werror are enforced.
  • The safety logic is tested and verified by unit tests for each supported car variant.

The above tests are themselves tested by:

  • a mutation test on the MISRA coverage
  • 100% line coverage enforced on the safety unit tests

In addition, we run the ruff linter and mypy on the car interface library.

Bounties

Every car port is eligible for a bounty:

In addition to the standard bounties, we also offer higher value bounties for more popular cars. See those at comma.ai/bounties.

FAQ

How do I use this? A comma four is custom-designed to be the best way to run and develop opendbc and openpilot.

Which cars are supported? See the supported cars list.

Can I add support for my car? Yes, most car support comes from the community. Read the guide here.

Which cars can be supported? Any car with LKAS and ACC. More info here.

How does this work? In short, we designed hardware to replace your car's built-in lane keep and adaptive cruise features. See this talk for an in-depth explanation.

Is there a timeline or roadmap for adding car support? No, most car support comes from the community, with comma doing final safety and quality validation. The more complete the community car port is and the more popular the car is, the more likely we are to pick it up as the next one to validate.

Terms

  • port: refers to the integration and support of a specific car
  • lateral control: aka steering control
  • longitudinal control: aka gas/brakes control
  • fingerprinting: automatic process for identifying the car
  • LKAS: lane keeping assist
  • ACC: adaptive cruise control
  • harness: car-specific hardware to attach to the car and intercept the ADAS messages
  • panda: hardware used to get on a car's CAN bus
  • ECU: computers or control modules inside the car
  • CAN bus: a bus that connects the ECUs in a car
  • cabana: our tool for reverse engineering CAN messages
  • DBC file: contains definitions for messages on a CAN bus
  • openpilot: an ADAS system for cars supported by opendbc
  • comma: the company behind opendbc
  • comma four: the hardware used to run openpilot

More resources

Come work with us -- comma.ai/jobs

comma is hiring engineers to work on opendbc and openpilot. We love hiring contributors.