Hyundai: add PT queries for all ECUs (#31334)

* We never had any bus 0 logging queries for CAN!

* should be logging

* try all, and try on can fd as well

* update refs

* oof forgot about hda2 can fd where pt is bus 1

* sheesh

* fix the timing

* fix ref
pull/31346/head
Shane Smiskol 1 year ago committed by GitHub
parent 4ec0ed311c
commit bcd29a2b8a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 29
      selfdrive/car/hyundai/values.py
  2. 6
      selfdrive/car/tests/test_fw_fingerprint.py

@ -414,6 +414,8 @@ PLATFORM_CODE_ECUS = [Ecu.fwdRadar, Ecu.fwdCamera, Ecu.eps]
# TODO: there are date codes in the ABS firmware versions in hex
DATE_FW_ECUS = [Ecu.fwdCamera]
ALL_HYUNDAI_ECUS = [Ecu.eps, Ecu.abs, Ecu.fwdRadar, Ecu.fwdCamera, Ecu.engine, Ecu.parkingAdas, Ecu.transmission, Ecu.adas, Ecu.hvac, Ecu.cornerRadar]
FW_QUERY_CONFIG = FwQueryConfig(
requests=[
# TODO: minimize shared whitelists for CAN and cornerRadar for CAN-FD
@ -447,6 +449,33 @@ FW_QUERY_CONFIG = FwQueryConfig(
obd_multiplexing=False,
),
# CAN & CAN FD logging queries (from camera)
Request(
[HYUNDAI_VERSION_REQUEST_LONG],
[HYUNDAI_VERSION_RESPONSE],
whitelist_ecus=ALL_HYUNDAI_ECUS,
bus=0,
auxiliary=True,
logging=True,
),
Request(
[HYUNDAI_VERSION_REQUEST_MULTI],
[HYUNDAI_VERSION_RESPONSE],
whitelist_ecus=ALL_HYUNDAI_ECUS,
bus=0,
auxiliary=True,
logging=True,
),
Request(
[HYUNDAI_VERSION_REQUEST_LONG],
[HYUNDAI_VERSION_RESPONSE],
whitelist_ecus=ALL_HYUNDAI_ECUS,
bus=1,
auxiliary=True,
obd_multiplexing=False,
logging=True,
),
# CAN-FD alt request logging queries
Request(
[HYUNDAI_VERSION_REQUEST_ALT],

@ -254,7 +254,7 @@ class TestFwFingerprintTiming(unittest.TestCase):
@pytest.mark.timeout(60)
def test_fw_query_timing(self):
total_ref_time = {1: 5.55, 2: 6.05}
total_ref_time = {1: 5.85, 2: 6.65}
brand_ref_times = {
1: {
'gm': 0.5,
@ -262,7 +262,7 @@ class TestFwFingerprintTiming(unittest.TestCase):
'chrysler': 0.3,
'ford': 0.1,
'honda': 0.55,
'hyundai': 0.65,
'hyundai': 0.95,
'mazda': 0.1,
'nissan': 0.8,
'subaru': 0.45,
@ -272,7 +272,7 @@ class TestFwFingerprintTiming(unittest.TestCase):
},
2: {
'ford': 0.2,
'hyundai': 1.05,
'hyundai': 1.65,
}
}

Loading…
Cancel
Save