i6 brake adjust

This commit is contained in:
firestar5683
2026-05-20 16:49:52 -05:00
parent f55402e033
commit 813507267c
3 changed files with 8 additions and 5 deletions
@@ -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]
@@ -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
@@ -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,