and this one too :o

pull/31221/head
Shane Smiskol 1 year ago
parent 1a7035612d
commit 164a83bc4b
  1. 28
      selfdrive/car/fw_versions.py

@ -271,22 +271,18 @@ def get_fw_versions(logcan, sendcan, query_brand=None, extra=None, timeout=0.1,
parallel_addrs = [] parallel_addrs = []
ecu_types = {} ecu_types = {}
# TODO: make this work with only extra_ecus (no platforms) for brand, config in FW_QUERY_CONFIGS.items():
for brand, brand_versions in versions.items(): for ecu_type, addr, sub_addr in config.get_all_ecus(versions[brand], include_ecu_type=True):
config = FW_QUERY_CONFIGS[brand] a = (brand, addr, sub_addr)
for ecu in brand_versions.values(): if a not in ecu_types:
# Each brand can define extra ECUs to query for data collection ecu_types[a] = ecu_type
for ecu_type, addr, sub_addr in list(ecu) + config.extra_ecus:
a = (brand, addr, sub_addr) if sub_addr is None:
if a not in ecu_types: if a not in parallel_addrs:
ecu_types[a] = ecu_type parallel_addrs.append(a)
else:
if sub_addr is None: if [a] not in addrs:
if a not in parallel_addrs: addrs.append([a])
parallel_addrs.append(a)
else:
if [a] not in addrs:
addrs.append([a])
addrs.insert(0, parallel_addrs) addrs.insert(0, parallel_addrs)

Loading…
Cancel
Save