Hyundai Azera: allow fingerprinting without comma power (#31717)

* do azera

* azera is same

* need to do this
pull/31718/head
Shane Smiskol 1 year ago committed by GitHub
parent ecce4663d3
commit ccda4119a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 15
      selfdrive/car/hyundai/values.py

@ -650,10 +650,16 @@ def match_fw_to_car_fuzzy(live_fw_versions, offline_fw_versions) -> set[str]:
expected_dates = {date for _, date in codes if date is not None} expected_dates = {date for _, date in codes if date is not None}
# Found platform codes & dates # Found platform codes & dates
codes = get_platform_codes(live_fw_versions.get(addr, set())) found_versions = live_fw_versions.get(addr, set())
codes = get_platform_codes(found_versions)
found_platform_codes = {code for code, _ in codes} found_platform_codes = {code for code, _ in codes}
found_dates = {date for _, date in codes if date is not None} found_dates = {date for _, date in codes if date is not None}
# Some models are missing ECUs
if not len(found_versions) and candidate in FW_QUERY_CONFIG.non_essential_ecus.get(ecu[0], []):
valid_found_ecus.add(addr)
continue
# Check platform code + part number matches for any found versions # Check platform code + part number matches for any found versions
if not any(found_platform_code in expected_platform_codes for found_platform_code in found_platform_codes): if not any(found_platform_code in expected_platform_codes for found_platform_code in found_platform_codes):
break break
@ -801,6 +807,13 @@ FW_QUERY_CONFIG = FwQueryConfig(
obd_multiplexing=False, obd_multiplexing=False,
), ),
], ],
# We lose these ECUs without the comma power on these cars.
# Note that we still attempt to match with them when they are present
non_essential_ecus={
Ecu.eps: [CAR.AZERA_6TH_GEN, CAR.AZERA_HEV_6TH_GEN], # FIXME: EPS responds on a few cars from PT
Ecu.transmission: [CAR.AZERA_6TH_GEN, CAR.AZERA_HEV_6TH_GEN],
Ecu.engine: [CAR.AZERA_6TH_GEN, CAR.AZERA_HEV_6TH_GEN],
},
extra_ecus=[ extra_ecus=[
(Ecu.adas, 0x730, None), # ADAS Driving ECU on HDA2 platforms (Ecu.adas, 0x730, None), # ADAS Driving ECU on HDA2 platforms
(Ecu.parkingAdas, 0x7b1, None), # ADAS Parking ECU (may exist on all platforms) (Ecu.parkingAdas, 0x7b1, None), # ADAS Parking ECU (may exist on all platforms)

Loading…
Cancel
Save