diff --git a/opendbc_repo/opendbc/car/hyundai/carcontroller.py b/opendbc_repo/opendbc/car/hyundai/carcontroller.py index 65d96e6a5..22d15a9a7 100644 --- a/opendbc_repo/opendbc/car/hyundai/carcontroller.py +++ b/opendbc_repo/opendbc/car/hyundai/carcontroller.py @@ -10,7 +10,7 @@ from opendbc.car.hyundai import hyundaicanfd, hyundaican from opendbc.car.hyundai.hyundaicanfd import CanBus from opendbc.car.hyundai.values import HyundaiFlags, HyundaiStarPilotFlags, Buttons, CarControllerParams, CAR, CANFD_ANGLE_LONGITUDINAL_CAR, \ CANFD_RADAR_LIVE_LONGITUDINAL_CAR, CANFD_ALT_BUTTONS_RESUME_CAR, kia_ev6_gt_line_longitudinal_tuning, \ - KIA_EV6_GT_LINE_LONG_TUNING_TESTING_GROUND_ID, CANFD_DAW_SUPPRESSION_CAR + KIA_EV6_GT_LINE_LONG_TUNING_TESTING_GROUND_ID from opendbc.car.interfaces import CarControllerBase from opendbc.car.vehicle_model import VehicleModel from openpilot.common.params import Params @@ -894,9 +894,6 @@ class CarController(CarControllerBase): can_sends.extend(hyundaicanfd.create_inactive_angle_steering_messages(self.packer, self.CAN, inactive_steering_angle)) - if self.CP.carFingerprint in CANFD_DAW_SUPPRESSION_CAR and getattr(CS, "stock_daw_msg", None): - can_sends.append(hyundaicanfd.create_suppress_daw(self.packer, self.CAN, CS.stock_daw_msg)) - # prevent LFA from activating on LKA steering cars by sending "no lane lines detected" to ADAS ECU suppress_lfa = bool(lka_steering) if angle_lkas_alt: diff --git a/opendbc_repo/opendbc/car/hyundai/carstate.py b/opendbc_repo/opendbc/car/hyundai/carstate.py index e1d9c5ace..eb34a3576 100644 --- a/opendbc_repo/opendbc/car/hyundai/carstate.py +++ b/opendbc_repo/opendbc/car/hyundai/carstate.py @@ -10,7 +10,6 @@ from opendbc.car.hyundai.hyundaicanfd import CanBus from opendbc.car.hyundai.values import HyundaiFlags, HyundaiStarPilotFlags, HyundaiStarPilotSafetyFlags, CAR, DBC, Buttons, CarControllerParams, \ CANFD_ANGLE_LONGITUDINAL_CAR, CANFD_CORNER_RADAR_BSM_CAR, \ CANFD_ALT_BUTTONS_RESUME_CAR, \ - CANFD_DAW_SUPPRESSION_CAR, \ hyundai_cancel_button_enables_cruise, ALT_BUS_LDA_BUTTON_CARS, ALT_BUS_LDA_BUTTON_SWL_STAT_CARS from opendbc.car.interfaces import CarStateBase @@ -144,7 +143,6 @@ class CarState(CarStateBase): self.lfa_block_msg = {} self.stock_lkas_msg = {} self.lkas12 = {} - self.stock_daw_msg = {} self.stock_lfa_msg = {} self.stock_lfahda_cluster_msg = {} self.stock_camera_lead_visible = False @@ -615,8 +613,6 @@ class CarState(CarStateBase): if self.CP.carFingerprint in CANFD_ANGLE_LONGITUDINAL_CAR and cp.ts_nanos["FR_CMR_01_10ms"]["FR_CMR_Crc1Val"] > 0: hba_icon = int(cp.vl["FR_CMR_01_10ms"]["HBA_IndLmpReq"]) self.hba_icon = hba_icon if hba_icon in (1, 2) else 0 - if self.CP.carFingerprint in CANFD_DAW_SUPPRESSION_CAR and cp.ts_nanos["FR_CMR_01_10ms"]["FR_CMR_Crc1Val"] > 0: - self.stock_daw_msg = copy.copy(cp.vl["FR_CMR_01_10ms"]) if cp.ts_nanos["BLINKER_STALKS"]["CHECKSUM_MAYBE"] > 0: self.stock_blinker_stalks_ts = cp.ts_nanos["BLINKER_STALKS"]["CHECKSUM_MAYBE"] @@ -680,7 +676,7 @@ class CarState(CarStateBase): ] if CP.enableBsm: msgs.append(("BLINDSPOTS_REAR_CORNERS", 0)) - if CP.carFingerprint in CANFD_ANGLE_LONGITUDINAL_CAR | CANFD_DAW_SUPPRESSION_CAR: + if CP.carFingerprint in CANFD_ANGLE_LONGITUDINAL_CAR: msgs.append(("BLINDSPOTS_FRONT_CORNER_2", 0)) msgs.append(("FR_CMR_01_10ms", 0)) if CP.flags & HyundaiFlags.EV: diff --git a/opendbc_repo/opendbc/car/hyundai/hyundaicanfd.py b/opendbc_repo/opendbc/car/hyundai/hyundaicanfd.py index 121999adf..f93f62c41 100644 --- a/opendbc_repo/opendbc/car/hyundai/hyundaicanfd.py +++ b/opendbc_repo/opendbc/car/hyundai/hyundaicanfd.py @@ -243,12 +243,6 @@ def create_suppress_lfa(packer, CAN, lfa_block_msg, lka_steering_alt): return packer.make_can_msg(suppress_msg, CAN.ACAN, values) -def create_suppress_daw(packer, CAN, daw_msg): - values = copy.copy(daw_msg) - values["DAW_WrnMsgSta"] = 0 - return packer.make_can_msg("FR_CMR_01_10ms", CAN.ECAN, values) - - def create_buttons(packer, CP, CAN, cnt, btn=0, base_values=None, left_paddle=False, right_paddle=False): values = {k: v for k, v in base_values.items() if k not in ("CHECKSUM", "_CHECKSUM", "COUNTER")} if base_values else {} values.update({ diff --git a/opendbc_repo/opendbc/car/hyundai/tests/test_hyundai.py b/opendbc_repo/opendbc/car/hyundai/tests/test_hyundai.py index b91a81e6f..2515a5c13 100644 --- a/opendbc_repo/opendbc/car/hyundai/tests/test_hyundai.py +++ b/opendbc_repo/opendbc/car/hyundai/tests/test_hyundai.py @@ -570,41 +570,6 @@ class TestHyundaiFingerprint: assert not (CP.flags & HyundaiFlags.CANFD_LKA_STEERING) assert bool(CP.flags & HyundaiFlags.CANFD_CAMERA_SCC) - def test_ioniq_6_filters_stock_driver_attention_warning(self): - CP = CarParams.new_message() - CP.carFingerprint = CAR.HYUNDAI_IONIQ_6 - CP.flags = int(HyundaiFlags.CANFD | HyundaiFlags.EV | HyundaiFlags.CANFD_LKA_STEERING | - HyundaiFlags.CANFD_LKA_STEERING_ALT) - CP.openpilotLongitudinalControl = False - - controller = CarController(DBC[CP.carFingerprint], CP) - controller.frame = 1 - can_bus = CanBus(CP) - parser = CANParser(DBC[CP.carFingerprint][Bus.pt], [("FR_CMR_01_10ms", 0)], can_bus.ECAN) - stock_daw_msg = { - "FR_CMR_AlvCnt1Val": 7, - "DAW_SysSta": 6, - "DAW_WrnMsgSta": 1, - "HBA_IndLmpReq": 2, - } - cc = SimpleNamespace(enabled=True, latActive=True, - actuators=SimpleNamespace(longControlState=LongCtrlState.off), - leftBlinker=False, rightBlinker=False, hudControl=SimpleNamespace()) - cs = SimpleNamespace(stock_lfa_msg=None, stock_lkas_msg={}, lfa_block_msg={}, stock_daw_msg=stock_daw_msg, - out=SimpleNamespace(steeringAngleDeg=0.0, gearShifter=structs.CarState.GearShifter.drive)) - - msgs = controller.create_canfd_msgs(0, True, 0.0, 0.0, 0.0, 0.0, False, cc.hudControl, cs, cc, - get_test_toggles(), lka_icon=2, lfa_icon=2) - daw_msgs = [msg for msg in msgs if msg[0] == 0x11A] - assert len(daw_msgs) == 1 - - parser.update([(1, daw_msgs)]) - - assert parser.can_valid - assert parser.vl["FR_CMR_01_10ms"]["DAW_SysSta"] == 6 - assert parser.vl["FR_CMR_01_10ms"]["DAW_WrnMsgSta"] == 0 - assert parser.vl["FR_CMR_01_10ms"]["HBA_IndLmpReq"] == 2 - def test_ioniq_6_clears_torque_with_inactive_safety_request(self): ioniq_6_cp = SimpleNamespace(carFingerprint=CAR.HYUNDAI_IONIQ_6) other_cp = SimpleNamespace(carFingerprint=CAR.KIA_EV6) diff --git a/opendbc_repo/opendbc/car/hyundai/values.py b/opendbc_repo/opendbc/car/hyundai/values.py index 38e0dbe5b..d1f6bc38f 100644 --- a/opendbc_repo/opendbc/car/hyundai/values.py +++ b/opendbc_repo/opendbc/car/hyundai/values.py @@ -1204,7 +1204,6 @@ CANFD_SECURITYACCESS_CAR = { } CANFD_UNSUPPORTED_LONGITUDINAL_CAR = CAR.with_flags(HyundaiFlags.CANFD_NO_RADAR_DISABLE) - CANFD_SECURITYACCESS_CAR # TODO: merge with UNSUPPORTED_LONGITUDINAL_CAR CANFD_ANGLE_LONGITUDINAL_CAR = {CAR.KIA_EV9, CAR.HYUNDAI_IONIQ_5_PE} -CANFD_DAW_SUPPRESSION_CAR = {CAR.HYUNDAI_IONIQ_6} CANFD_ALT_BUTTONS_RESUME_CAR = {CAR.KIA_CARNIVAL_2025, CAR.KIA_CARNIVAL_HEV_4TH_GEN} CANFD_CORNER_RADAR_BSM_CAR = {CAR.HYUNDAI_IONIQ_6, CAR.HYUNDAI_IONIQ_5_PE, CAR.KIA_EV9} CANFD_RADAR_LIVE_LONGITUDINAL_CAR = { diff --git a/opendbc_repo/opendbc/safety/modes/hyundai_canfd.h b/opendbc_repo/opendbc/safety/modes/hyundai_canfd.h index f88af7bd6..c47ff06f0 100644 --- a/opendbc_repo/opendbc/safety/modes/hyundai_canfd.h +++ b/opendbc_repo/opendbc/safety/modes/hyundai_canfd.h @@ -16,7 +16,6 @@ #define HYUNDAI_CANFD_LKA_STEERING_ALT_COMMON_TX_MSGS(a_can, e_can) \ HYUNDAI_CANFD_CRUISE_BUTTON_TX_MSGS(e_can) \ - {0x11A, e_can, 16, .check_relay = (e_can) == 0}, /* FR_CMR_01_10ms */ \ {0x110, a_can, 32, .check_relay = (a_can) == 0, .disable_static_blocking = true}, /* LKAS_ALT */ \ {0x362, a_can, 32, .check_relay = (a_can) == 0, .disable_static_blocking = true}, /* CAM_0x362 */ \ diff --git a/opendbc_repo/opendbc/safety/tests/test_hyundai_canfd.py b/opendbc_repo/opendbc/safety/tests/test_hyundai_canfd.py index 03ef6bca7..c9400dece 100755 --- a/opendbc_repo/opendbc/safety/tests/test_hyundai_canfd.py +++ b/opendbc_repo/opendbc/safety/tests/test_hyundai_canfd.py @@ -568,7 +568,7 @@ class TestHyundaiCanfdLKASteeringEV(TestHyundaiCanfdBase): # TODO: Handle ICE and HEV configurations once we see cars that use the new messages class TestHyundaiCanfdLKASteeringAltEV(TestHyundaiCanfdBase): - TX_MSGS = [[0x11A, 1], [0x110, 0], [0x1CF, 1], [0x362, 0]] + TX_MSGS = [[0x110, 0], [0x1CF, 1], [0x362, 0]] RELAY_MALFUNCTION_ADDRS = {0: (0x110, 0x362)} # LKAS_ALT, CAM_0x362 FWD_BLACKLISTED_ADDRS = {2: [0x110, 0x362]} @@ -587,7 +587,7 @@ class TestHyundaiCanfdLKASteeringAltEV(TestHyundaiCanfdBase): class TestHyundaiCanfdLKASteeringAltButtonsICE(TestHyundaiCanfdLKASteeringAltEV): - TX_MSGS = [[0x11A, 1], [0x110, 0], [0x1CF, 1], [0x1A0, 1], [0x362, 0]] + TX_MSGS = [[0x110, 0], [0x1CF, 1], [0x1A0, 1], [0x362, 0]] GAS_MSG = ("ACCELERATOR_BRAKE_ALT", "ACCELERATOR_PEDAL_PRESSED") def setUp(self): @@ -691,7 +691,7 @@ class TestHyundaiCanfdLKASteeringLongEV(HyundaiLongitudinalBase, TestHyundaiCanf class TestHyundaiCanfdLKASteeringAltAngleLongEV(HyundaiLongitudinalBase, TestHyundaiCanfdAngleSteering): - TX_MSGS = [[0x11A, 1], [0x110, 0], [0x1CF, 1], [0x362, 0], [0x51, 0], [0x100, 0], [0x730, 1], [0x12a, 1], [0x160, 1], + TX_MSGS = [[0x110, 0], [0x1CF, 1], [0x362, 0], [0x51, 0], [0x100, 0], [0x730, 1], [0x12a, 1], [0x160, 1], [0x1ba, 1], [0x1e0, 1], [0x1e5, 1], [0x31a, 1], [0x3b5, 1], [0x3c1, 1], [0x1a0, 1], [0x1ea, 1], [0x200, 1], [0x345, 1], [0x1da, 1]]