From 56614124f0f3e927caadf9bb66fa68e9532fe247 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Thu, 15 Jun 2023 16:32:32 -0700 Subject: [PATCH] FPv2: don't add debug candidates to versions globally (#28562) * debugging * this test works, but find a better place * make test more generic to start testing more than timings no need to run again in another test function. eventually we can simulate ECUs and have IsoTpParallelQuery work properly * Revert "make test more generic to start testing more than timings" This reverts commit 58e8536b1d8b138902d373e1e1194e70c9eb4b24. * 2nd try * clean up * not even MappingProxyType works * works * test that too * clean up * refactor to avoid modification online * revert tests * more revert * no longer needed * clean up --- selfdrive/car/fw_versions.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/selfdrive/car/fw_versions.py b/selfdrive/car/fw_versions.py index 5c07134d82..5a7a2174c7 100755 --- a/selfdrive/car/fw_versions.py +++ b/selfdrive/car/fw_versions.py @@ -255,10 +255,6 @@ def get_fw_versions(logcan, sendcan, query_brand=None, extra=None, timeout=0.1, versions = VERSIONS.copy() params = Params() - # Each brand can define extra ECUs to query for data collection - for brand, config in FW_QUERY_CONFIGS.items(): - versions[brand]["debug"] = {ecu: [] for ecu in config.extra_ecus} - if query_brand is not None: versions = {query_brand: versions[query_brand]} @@ -272,8 +268,10 @@ def get_fw_versions(logcan, sendcan, query_brand=None, extra=None, timeout=0.1, ecu_types = {} for brand, brand_versions in versions.items(): + config = FW_QUERY_CONFIGS[brand] for ecu in brand_versions.values(): - for ecu_type, addr, sub_addr in ecu.keys(): + # Each brand can define extra ECUs to query for data collection + for ecu_type, addr, sub_addr in list(ecu) + config.extra_ecus: a = (brand, addr, sub_addr) if a not in ecu_types: ecu_types[a] = ecu_type