pull/28423/head
Shane Smiskol 2 years ago
parent 04c9963d17
commit ee1a6c7c21
  1. 3
      selfdrive/car/fw_versions.py
  2. 2
      selfdrive/debug/internal/fuzz_fw_fingerprint.py

@ -57,7 +57,7 @@ def match_fw_to_car_fuzzy(fw_versions_dict, log=True, exclude=None):
# Getting this exactly right isn't crucial, but excluding camera and radar makes it almost # Getting this exactly right isn't crucial, but excluding camera and radar makes it almost
# impossible to get 3 matching versions, even if two models with shared parts are released at the same # impossible to get 3 matching versions, even if two models with shared parts are released at the same
# time and only one is in our database. # time and only one is in our database.
exclude_types = [Ecu.eps, Ecu.debug] exclude_types = [Ecu.fwdCamera, Ecu.fwdRadar, Ecu.eps, Ecu.debug]
# Build lookup table from (addr, sub_addr, fw) to list of candidate cars # Build lookup table from (addr, sub_addr, fw) to list of candidate cars
all_fw_versions = defaultdict(list) all_fw_versions = defaultdict(list)
@ -89,7 +89,6 @@ def match_fw_to_car_fuzzy(fw_versions_dict, log=True, exclude=None):
elif candidate != candidates[0]: elif candidate != candidates[0]:
return set() return set()
print(candidate, match_count, len(matched_ecus), match_count == len(matched_ecus))
if len(matched_ecus) >= 2: if len(matched_ecus) >= 2:
if log: if log:
cloudlog.error(f"Fingerprinted {candidate} using fuzzy match. {len(matched_ecus)} matching ECUs") cloudlog.error(f"Fingerprinted {candidate} using fuzzy match. {len(matched_ecus)} matching ECUs")

@ -24,7 +24,7 @@ if __name__ == "__main__":
wrong_match = 0 wrong_match = 0
confusions = defaultdict(set) confusions = defaultdict(set)
for _ in tqdm(range(10)): for _ in tqdm(range(1000)):
for candidate, fws in FWS.items(): for candidate, fws in FWS.items():
fw_dict = {} fw_dict = {}
for (tp, addr, subaddr), fw_list in fws.items(): for (tp, addr, subaddr), fw_list in fws.items():

Loading…
Cancel
Save