mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-01 19:42:07 +08:00
FPv2: only query brands with matching present ECUs (#27697)
* speed up fingerprinting for CAN fp cars * add comment to describe this behavior * more explicit, no defaultdict * do this later * fix * a little more clear I think old-commit-hash: 9b1095a27e6d9645ef64fcea3a6375117bccfe6e
This commit is contained in:
@@ -221,6 +221,10 @@ def get_fw_versions_ordered(logcan, sendcan, ecu_rx_addrs, timeout=0.1, num_pand
|
||||
brand_matches = get_brand_ecu_matches(ecu_rx_addrs)
|
||||
|
||||
for brand in sorted(brand_matches, key=lambda b: len(brand_matches[b]), reverse=True):
|
||||
# Skip this brand if there are no matching present ECUs
|
||||
if not len(brand_matches[brand]):
|
||||
continue
|
||||
|
||||
car_fw = get_fw_versions(logcan, sendcan, query_brand=brand, timeout=timeout, num_pandas=num_pandas, debug=debug, progress=progress)
|
||||
all_car_fw.extend(car_fw)
|
||||
# Try to match using FW returned from this brand only
|
||||
|
||||
Reference in New Issue
Block a user