From 0ce8161cbf33c8f66d2439bbf9c92d9104e0afcf Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Mon, 11 May 2026 17:04:43 -0500 Subject: [PATCH] i6 --- opendbc_repo/opendbc/car/hyundai/carcontroller.py | 5 ++--- opendbc_repo/opendbc/car/hyundai/tests/test_hyundai.py | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/opendbc_repo/opendbc/car/hyundai/carcontroller.py b/opendbc_repo/opendbc/car/hyundai/carcontroller.py index 57c606698..6f69c8943 100644 --- a/opendbc_repo/opendbc/car/hyundai/carcontroller.py +++ b/opendbc_repo/opendbc/car/hyundai/carcontroller.py @@ -326,15 +326,14 @@ class CarController(CarControllerBase): else IONIQ_6_IPEDAL_PRESS_SEND_COUNT self._ioniq_6_regen_request_sent = False if max_regen_state or ipedal_latch_pending: - self._ioniq_6_ipedal_latch_counter = hyundaicanfd.get_ioniq_6_cruise_buttons_next_counter(buttons_counter) \ - if 0 <= buttons_counter < hyundaicanfd.IONIQ_6_CRUISE_BUTTONS_COUNTER_MAX else -1 + self._ioniq_6_ipedal_latch_counter = buttons_counter if 0 <= buttons_counter < hyundaicanfd.IONIQ_6_CRUISE_BUTTONS_COUNTER_MAX else -1 else: self._ioniq_6_ipedal_latch_counter = -1 if self._ioniq_6_always_ipedal_press_remaining > 0: if max_regen_state or ipedal_latch_pending: if self._ioniq_6_ipedal_latch_counter < 0 and 0 <= buttons_counter < hyundaicanfd.IONIQ_6_CRUISE_BUTTONS_COUNTER_MAX: - self._ioniq_6_ipedal_latch_counter = hyundaicanfd.get_ioniq_6_cruise_buttons_next_counter(buttons_counter) + self._ioniq_6_ipedal_latch_counter = buttons_counter if 0 <= self._ioniq_6_ipedal_latch_counter < hyundaicanfd.IONIQ_6_CRUISE_BUTTONS_COUNTER_MAX: # A real successful i-Pedal pull is a short held press followed by release, not a continuous hold. diff --git a/opendbc_repo/opendbc/car/hyundai/tests/test_hyundai.py b/opendbc_repo/opendbc/car/hyundai/tests/test_hyundai.py index d27ad7cdc..365a244a8 100644 --- a/opendbc_repo/opendbc/car/hyundai/tests/test_hyundai.py +++ b/opendbc_repo/opendbc/car/hyundai/tests/test_hyundai.py @@ -484,7 +484,7 @@ class TestHyundaiFingerprint: sends = controller._update_ioniq_6_always_ipedal(cc, cs, toggles) assert sends - assert [msg[1].hex() for msg in sends if msg[0] == 0x1CF] == ["9060002800000000"] + assert [msg[1].hex() for msg in sends if msg[0] == 0x1CF] == ["4650002800000000"] assert controller._ioniq_6_always_ipedal_press_remaining == 5 def test_ioniq_6_always_ipedal_sends_regen_control_companion_once_max_regen_is_shown(self): @@ -551,7 +551,7 @@ class TestHyundaiFingerprint: sends = controller._update_ioniq_6_always_ipedal(cc, cs, toggles) paddle_msgs = [msg for msg in sends if msg[0] == 0x1CF] - assert [msg[1].hex() for msg in paddle_msgs] == ["9060002800000000"] + assert [msg[1].hex() for msg in paddle_msgs] == ["4650002800000000"] regen_cmd = next(msg for msg in sends if msg[0] == 0x25A) assert regen_cmd[1][24:28] == bytes.fromhex("c00c1200") checksum = hyundaicanfd.hkg_can_fd_checksum(regen_cmd[0], None, bytearray(regen_cmd[1])) @@ -564,7 +564,7 @@ class TestHyundaiFingerprint: sends = controller._update_ioniq_6_always_ipedal(cc, cs, toggles) paddle_msgs = [msg for msg in sends if msg[0] == 0x1CF] - assert [msg[1].hex() for msg in paddle_msgs] == ["2970002800000000"] + assert [msg[1].hex() for msg in paddle_msgs] == ["9060002800000000"] assert not any(msg[0] == 0x25A for msg in sends) def test_ioniq_6_longitudinal_params_match_canfd_tune(self):