From 813507267c452e2ab8532118b89b3a62b68d7e4f Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Wed, 20 May 2026 16:49:52 -0500 Subject: [PATCH] i6 brake adjust --- opendbc_repo/opendbc/car/hyundai/carcontroller.py | 2 +- opendbc_repo/opendbc/car/hyundai/interface.py | 3 +++ opendbc_repo/opendbc/car/hyundai/tests/test_hyundai.py | 8 ++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/opendbc_repo/opendbc/car/hyundai/carcontroller.py b/opendbc_repo/opendbc/car/hyundai/carcontroller.py index 5a6ea9aa0d..d4b4b13978 100644 --- a/opendbc_repo/opendbc/car/hyundai/carcontroller.py +++ b/opendbc_repo/opendbc/car/hyundai/carcontroller.py @@ -50,7 +50,7 @@ IONIQ_6_LAUNCH_HOLD_SPEED_BP = [0.0, 0.6, 1.25, 2.5] IONIQ_6_LAUNCH_HOLD_SPEED_V = [0.75, 0.6, 0.4, 0.0] IONIQ_6_STOP_BRAKE_CAP_MAX_SPEED = 2.0 IONIQ_6_STOP_BRAKE_CAP_SPEED_BP = [0.0, 0.08, 0.25, 0.6, 1.2, 2.0, 3.0] -IONIQ_6_STOP_BRAKE_CAP_ACCEL_V = [-0.09, -0.10, -0.11, -0.22, -0.50, -0.95, -1.40] +IONIQ_6_STOP_BRAKE_CAP_ACCEL_V = [-0.15, -0.16, -0.22, -0.42, -0.78, -1.15, -1.40] IONIQ_6_STOP_HOLD_JERK_BP = [0.0, 0.15, 0.6, 1.2, 2.0, 3.0] IONIQ_6_STOP_HOLD_JERK_V = [0.35, 0.40, 0.48, 0.65, 0.85, 1.10] IONIQ_6_STOP_RELEASE_JERK_BP = [0.0, 0.15, 0.5] diff --git a/opendbc_repo/opendbc/car/hyundai/interface.py b/opendbc_repo/opendbc/car/hyundai/interface.py index c159e11433..97d14a64f2 100644 --- a/opendbc_repo/opendbc/car/hyundai/interface.py +++ b/opendbc_repo/opendbc/car/hyundai/interface.py @@ -201,6 +201,9 @@ class CarInterface(CarInterfaceBase): ret.vEgoStarting = 0.5 ret.vEgoStopping = 0.35 + if candidate == CAR.HYUNDAI_IONIQ_6: + ret.longitudinalActuatorDelay = 0.6 + if candidate == CAR.KIA_NIRO_PHEV_2022: ret.stopAccel = -1.4 ret.stoppingDecelRate = 0.5 diff --git a/opendbc_repo/opendbc/car/hyundai/tests/test_hyundai.py b/opendbc_repo/opendbc/car/hyundai/tests/test_hyundai.py index c585dcf0b7..4bbd5505be 100644 --- a/opendbc_repo/opendbc/car/hyundai/tests/test_hyundai.py +++ b/opendbc_repo/opendbc/car/hyundai/tests/test_hyundai.py @@ -381,7 +381,7 @@ class TestHyundaiFingerprint: assert CP.vEgoStopping == pytest.approx(0.3) assert CP.vEgoStarting == pytest.approx(0.1) assert CP.stoppingDecelRate == pytest.approx(0.4) - assert CP.longitudinalActuatorDelay == pytest.approx(0.5) + assert CP.longitudinalActuatorDelay == pytest.approx(0.6) assert CP.startingState def test_ioniq_6_longitudinal_tuning_helper_matches_dynamic_profile(self): @@ -447,9 +447,9 @@ class TestHyundaiFingerprint: state = update_ioniq_6_longitudinal_tuning(state, accel_cmd=-1.8, v_ego=0.0, a_ego=0.0, long_control_state=LongCtrlState.stopping, long_active=True) - assert state.desired_accel == pytest.approx(-0.09) + assert state.desired_accel == pytest.approx(-0.15) assert state.jerk_upper == pytest.approx(0.42) - assert state.actual_accel == pytest.approx(-0.099) + assert state.actual_accel == pytest.approx(-0.15) def test_ioniq_6_longitudinal_tuning_helper_caps_final_low_speed_stop_brake(self): state = Ioniq6LongitudinalTuningState(actual_accel=-2.82, accel_last=-2.82, @@ -458,7 +458,7 @@ class TestHyundaiFingerprint: state = update_ioniq_6_longitudinal_tuning(state, accel_cmd=-2.82, v_ego=1.8, a_ego=-2.4, long_control_state=LongCtrlState.stopping, long_active=True) assert state.stopping - assert state.desired_accel == pytest.approx(-0.8375) + assert state.desired_accel == pytest.approx(-1.0575) for _ in range(10): state = update_ioniq_6_longitudinal_tuning(state, accel_cmd=-2.82, v_ego=1.8, a_ego=-2.4,