From 2dda9a0532dc9b848e53317bd1a6dab1ef83e5c3 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 6 Jun 2023 20:28:56 -0700 Subject: [PATCH] match_fw_to_car: pass down log (#28434) pass in log from match_fw_to_car --- selfdrive/car/fw_versions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/selfdrive/car/fw_versions.py b/selfdrive/car/fw_versions.py index cd3ef7977c..5c36ba5664 100755 --- a/selfdrive/car/fw_versions.py +++ b/selfdrive/car/fw_versions.py @@ -94,7 +94,7 @@ def match_fw_to_car_fuzzy(fw_versions_dict, log=True, exclude=None): return set() -def match_fw_to_car_exact(fw_versions_dict) -> Set[str]: +def match_fw_to_car_exact(fw_versions_dict, log=True) -> Set[str]: """Do an exact FW match. Returns all cars that match the given FW versions for a list of "essential" ECUs. If an ECU is not considered essential the FW version can be missing to get a fingerprint, but if it's present it @@ -129,7 +129,7 @@ def match_fw_to_car_exact(fw_versions_dict) -> Set[str]: return set(candidates.keys()) - set(invalid) -def match_fw_to_car(fw_versions, allow_exact=True, allow_fuzzy=True): +def match_fw_to_car(fw_versions, allow_exact=True, allow_fuzzy=True, log=True): # Try exact matching first exact_matches = [] if allow_exact: @@ -142,7 +142,7 @@ def match_fw_to_car(fw_versions, allow_exact=True, allow_fuzzy=True): matches = set() for brand in VERSIONS.keys(): fw_versions_dict = build_fw_dict(fw_versions, filter_brand=brand) - matches |= match_func(fw_versions_dict) + matches |= match_func(fw_versions_dict, log=log) if len(matches): return exact_match, matches