mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-17 23:32:07 +08:00
match_fw_to_car: pass down log (#28434)
pass in log from match_fw_to_car old-commit-hash: 2dda9a0532dc9b848e53317bd1a6dab1ef83e5c3
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user