From d828b69e140f5dda2450d40bafe4c018b01a2577 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Thu, 20 Oct 2022 20:10:09 -0700 Subject: [PATCH] Hyundai: add corner radar FW query (#26143) * Hyundai: add corner radar FW query * Add to both, and fix when we look at data * add TODO * comments Co-authored-by: Shane Smiskol --- selfdrive/car/hyundai/values.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/selfdrive/car/hyundai/values.py b/selfdrive/car/hyundai/values.py index d5b8427f66..c11bf67d15 100644 --- a/selfdrive/car/hyundai/values.py +++ b/selfdrive/car/hyundai/values.py @@ -292,6 +292,8 @@ HYUNDAI_VERSION_RESPONSE = bytes([uds.SERVICE_TYPE.READ_DATA_BY_IDENTIFIER + 0x4 FW_QUERY_CONFIG = FwQueryConfig( requests=[ + # TODO: minimize shared whitelists for CAN and cornerRadar for CAN-FD + # CAN queries (OBD-II port) Request( [HYUNDAI_VERSION_REQUEST_LONG], [HYUNDAI_VERSION_RESPONSE], @@ -302,22 +304,23 @@ FW_QUERY_CONFIG = FwQueryConfig( [HYUNDAI_VERSION_RESPONSE], whitelist_ecus=[Ecu.engine, Ecu.transmission, Ecu.eps, Ecu.abs, Ecu.fwdRadar], ), - # CAN-FD queries + # CAN-FD queries (camera) Request( [HYUNDAI_VERSION_REQUEST_LONG], [HYUNDAI_VERSION_RESPONSE], - whitelist_ecus=[Ecu.fwdCamera, Ecu.fwdRadar], + whitelist_ecus=[Ecu.fwdCamera, Ecu.fwdRadar, Ecu.cornerRadar], bus=4, ), Request( [HYUNDAI_VERSION_REQUEST_LONG], [HYUNDAI_VERSION_RESPONSE], - whitelist_ecus=[Ecu.fwdCamera, Ecu.adas], + whitelist_ecus=[Ecu.fwdCamera, Ecu.adas, Ecu.cornerRadar], bus=5, ), ], extra_ecus=[ - (Ecu.adas, 0x730, None), # ADAS Driving ECU on HDA2 platforms + (Ecu.adas, 0x730, None), # ADAS Driving ECU on HDA2 platforms + (Ecu.cornerRadar, 0x7b7, None), ], )