diff --git a/selfdrive/car/toyota/tests/test_toyota.py b/selfdrive/car/toyota/tests/test_toyota.py index 2b813b3430..f51e2e9ae5 100755 --- a/selfdrive/car/toyota/tests/test_toyota.py +++ b/selfdrive/car/toyota/tests/test_toyota.py @@ -148,30 +148,35 @@ class TestToyotaFingerprint(unittest.TestCase): # Asserts a list of platforms that will not fuzzy fingerprint with platform codes due to them being shared. # This list can be shrunk as we combine platforms, detect features, and add the hybrid ECU excluded_platforms = { - CAR.LEXUS_ESH_TSS2, - CAR.RAV4_TSS2_2022, + # # CAR.LEXUS_ESH_TSS2, + # # CAR.RAV4_TSS2_2022, CAR.LEXUS_ES_TSS2, - CAR.RAV4_TSS2, - CAR.RAV4_TSS2_2023, - CAR.CAMRY, - CAR.HIGHLANDER_TSS2, - CAR.RAV4H_TSS2, + # # CAR.RAV4_TSS2, + # # CAR.RAV4_TSS2_2023, + # CAR.RAV4_TSS2, + # # CAR.CAMRY, + # CAR.HIGHLANDER_TSS2, + # CAR.RAV4H_TSS2, CAR.LEXUS_RX_TSS2, - CAR.CAMRYH_TSS2, - CAR.CHR, - CAR.RAV4H, - CAR.RAV4H_TSS2_2022, - CAR.HIGHLANDERH_TSS2, - CAR.RAV4, - CAR.CHR_TSS2, - CAR.CHRH, - CAR.RAV4H_TSS2_2023, - CAR.CAMRY_TSS2, - CAR.COROLLA_TSS2, + # # CAR.CAMRYH_TSS2, + # CAR.CHR, + # # CAR.RAV4H, + # CAR.RAV4H_TSS2_2022, + # # CAR.HIGHLANDERH_TSS2, + # # CAR.RAV4, + # # CAR.CHR_TSS2, + # CAR.CHRH, + # CAR.RAV4H_TSS2_2023, + # CAR.CAMRY_TSS2, + # CAR.COROLLA_TSS2, } platforms_with_shared_codes = set() for platform, fw_by_addr in FW_VERSIONS.items(): + # if platform != CAR.RAV4_TSS2: + # continue + # if 'RAV4 HYBRID' not in platform: + # continue print('platform', platform) car_fw = [] for ecu, fw_versions in fw_by_addr.items(): diff --git a/selfdrive/car/toyota/values.py b/selfdrive/car/toyota/values.py index 0bd10b326e..ecd125cda8 100644 --- a/selfdrive/car/toyota/values.py +++ b/selfdrive/car/toyota/values.py @@ -259,9 +259,6 @@ def get_platform_codes(fw_versions: List[bytes]) -> Set[Tuple[bytes, Optional[by if not len(chunks): continue - # a = list(map(len, chunks)) - # print(fw, chunks, a) - # only first is considered for now since second is commonly shared (TODO: understand that) first_chunk = chunks[0] if len(first_chunk) == 8: @@ -274,7 +271,7 @@ def get_platform_codes(fw_versions: List[bytes]) -> Set[Tuple[bytes, Optional[by codes.add((platform + b'-' + major_version, sub_version)) elif len(first_chunk) == 10: - print('medium fw', fw) + # print('medium fw', fw) fw_match = MEDIUM_FW_PATTERN.search(first_chunk) if fw_match is not None: part, platform, major_version, sub_version = fw_match.groups() @@ -289,7 +286,7 @@ def get_platform_codes(fw_versions: List[bytes]) -> Set[Tuple[bytes, Optional[by # print('got long match!') part, platform, major_version, sub_version = fw_match.groups() # print(first_chunk, fw_match, fw_match.groups()) - codes.add((part + b'-' + platform, major_version + b'-' + sub_version)) + codes.add((part + b'-' + platform + b'-' + major_version, sub_version)) return codes