continue checking if candidate switches on these, that's fine to check

pull/28423/head
Shane Smiskol 2 years ago
parent 18987c45e7
commit 50709cc773
  1. 6
      selfdrive/car/fw_versions.py

@ -71,7 +71,7 @@ def match_fw_to_car_fuzzy(fw_versions_dict, log=True, exclude=None):
for f in fws:
all_fw_versions[(addr[1], addr[2], f)].append(candidate)
matched_ecus = []
matched_ecus = set()
candidate = None
for addr, versions in fw_versions_dict.items():
for version in versions:
@ -79,8 +79,8 @@ def match_fw_to_car_fuzzy(fw_versions_dict, log=True, exclude=None):
ecu_key = (addr[0], addr[1])
candidates = all_fw_versions[(*ecu_key, version)]
if len(candidates) == 1 and ecu_key not in matched_ecus:
matched_ecus.append(ecu_key)
if len(candidates) == 1:
matched_ecus.add(ecu_key)
if candidate is None:
candidate = candidates[0]
# We uniquely matched two different cars. No fuzzy match possible

Loading…
Cancel
Save