From 839147a333e2f671994bd4f84c9bb1e64660d92d Mon Sep 17 00:00:00 2001 From: Kyle Greenlaw Date: Fri, 17 Sep 2021 23:12:54 -0300 Subject: [PATCH] Add Hyundai Sonata Hybrid Radar FW for OP Long support (#22259) * add mondo dbc to Sonata Hybrid * 2021 Sonata Hybrid radar FW * Add Sonata Hybrid to openpilotLongitudinalControl * Whoops... , --- selfdrive/car/hyundai/interface.py | 2 +- selfdrive/car/hyundai/values.py | 2 +- selfdrive/debug/hyundai_enable_radar_points.py | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/selfdrive/car/hyundai/interface.py b/selfdrive/car/hyundai/interface.py index f2ecbbe2cb..ec68521142 100644 --- a/selfdrive/car/hyundai/interface.py +++ b/selfdrive/car/hyundai/interface.py @@ -25,7 +25,7 @@ class CarInterface(CarInterfaceBase): ret.safetyModel = car.CarParams.SafetyModel.hyundai ret.radarOffCan = RADAR_START_ADDR not in fingerprint[1] - ret.openpilotLongitudinalControl = Params().get_bool("DisableRadar") and candidate in [CAR.SONATA, CAR.PALISADE] + ret.openpilotLongitudinalControl = Params().get_bool("DisableRadar") and candidate in [CAR.SONATA, CAR.SONATA_HYBRID, CAR.PALISADE] ret.safetyParam = 0 # Most Hyundai car ports are community features for now diff --git a/selfdrive/car/hyundai/values.py b/selfdrive/car/hyundai/values.py index 026281a3f5..b3d9eccc70 100644 --- a/selfdrive/car/hyundai/values.py +++ b/selfdrive/car/hyundai/values.py @@ -780,7 +780,7 @@ DBC = { CAR.PALISADE: dbc_dict('hyundai_kia_generic', 'hyundai_kia_mando_front_radar'), CAR.VELOSTER: dbc_dict('hyundai_kia_generic', None), CAR.KIA_CEED: dbc_dict('hyundai_kia_generic', None), - CAR.SONATA_HYBRID: dbc_dict('hyundai_kia_generic', None), + CAR.SONATA_HYBRID: dbc_dict('hyundai_kia_generic', 'hyundai_kia_mando_front_radar'), } STEER_THRESHOLD = 150 diff --git a/selfdrive/debug/hyundai_enable_radar_points.py b/selfdrive/debug/hyundai_enable_radar_points.py index afd27d8868..12ed39da1e 100755 --- a/selfdrive/debug/hyundai_enable_radar_points.py +++ b/selfdrive/debug/hyundai_enable_radar_points.py @@ -28,6 +28,11 @@ SUPPORTED_FW_VERSIONS = { "default_config": b"\x00\x00\x00\x01\x00\x00", "tracks_enabled": b"\x00\x00\x00\x01\x00\x01", }, + # 2021 SONATA HYBRID + b"DNhe SCC FHCUP 1.00 1.02 99110-L5000 \x01#\x15# ": { + "default_config": b"\x00\x00\x00\x01\x00\x00", + "tracks_enabled": b"\x00\x00\x00\x01\x00\x01", + }, # 2020 PALISADE b"LX2_ SCC FHCUP 1.00 1.04 99110-S8100\x19\x05\x02\x16V ": { "default_config": b"\x00\x00\x00\x01\x00\x00",