From 021661b316f488682c9e4c1b586c9fb51384cdf6 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 24 Mar 2023 00:12:25 -0700 Subject: [PATCH] Hyundai CAN FD: log ADAS parking ECU FW version (#27662) * add parking and hvac ecus * needs a new query sadly * move space * temp * comment * fix * mid-solution stash * pretty cleannnnnnn * everything seems to be working * bump cereal * bump to master * bump to master * don't multiplex when we don't need it --- cereal | 2 +- selfdrive/car/hyundai/values.py | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/cereal b/cereal index d0ca2639d0..3c5ff1c6d0 160000 --- a/cereal +++ b/cereal @@ -1 +1 @@ -Subproject commit d0ca2639d057acda9ce56766f60658417ab6834a +Subproject commit 3c5ff1c6d069be21b32e2ac202115f4ea5d21bc7 diff --git a/selfdrive/car/hyundai/values.py b/selfdrive/car/hyundai/values.py index 5c677951b7..57d306496b 100644 --- a/selfdrive/car/hyundai/values.py +++ b/selfdrive/car/hyundai/values.py @@ -335,10 +335,15 @@ FINGERPRINTS = { HYUNDAI_VERSION_REQUEST_LONG = bytes([uds.SERVICE_TYPE.READ_DATA_BY_IDENTIFIER]) + \ p16(0xf100) # Long description + +HYUNDAI_VERSION_REQUEST_ALT = bytes([uds.SERVICE_TYPE.READ_DATA_BY_IDENTIFIER]) + \ + p16(0xf110) # Alt long description + HYUNDAI_VERSION_REQUEST_MULTI = bytes([uds.SERVICE_TYPE.READ_DATA_BY_IDENTIFIER]) + \ p16(uds.DATA_IDENTIFIER_TYPE.VEHICLE_MANUFACTURER_SPARE_PART_NUMBER) + \ p16(uds.DATA_IDENTIFIER_TYPE.APPLICATION_SOFTWARE_IDENTIFICATION) + \ p16(0xf100) + HYUNDAI_VERSION_RESPONSE = bytes([uds.SERVICE_TYPE.READ_DATA_BY_IDENTIFIER + 0x40]) FW_QUERY_CONFIG = FwQueryConfig( @@ -374,9 +379,28 @@ FW_QUERY_CONFIG = FwQueryConfig( auxiliary=True, obd_multiplexing=False, ), + + # CAN-FD debugging queries + Request( + [HYUNDAI_VERSION_REQUEST_ALT], + [HYUNDAI_VERSION_RESPONSE], + whitelist_ecus=[Ecu.parking], + bus=0, + auxiliary=True, + obd_multiplexing=False, + ), + Request( + [HYUNDAI_VERSION_REQUEST_ALT], + [HYUNDAI_VERSION_RESPONSE], + whitelist_ecus=[Ecu.parking], + bus=1, + auxiliary=True, + obd_multiplexing=False, + ), ], extra_ecus=[ (Ecu.adas, 0x730, None), # ADAS Driving ECU on HDA2 platforms + (Ecu.parking, 0x7b1, None), # ADAS Parking ECU (may exist on all platforms) (Ecu.hvac, 0x7b3, None), # HVAC Control Assembly (Ecu.cornerRadar, 0x7b7, None), ],