From 426072bd8717753afec89c4291f329bdedbc31b8 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 19 Dec 2023 20:30:42 -0800 Subject: [PATCH] fix bad CAN fingerprint type (#30809) fix bad wrong type --- selfdrive/car/fingerprints.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/selfdrive/car/fingerprints.py b/selfdrive/car/fingerprints.py index 7ff700f4c53d92..6a7c3c75bec32c 100644 --- a/selfdrive/car/fingerprints.py +++ b/selfdrive/car/fingerprints.py @@ -1,15 +1,12 @@ -from typing import Dict, List from openpilot.selfdrive.car.interfaces import get_interface_attr -OfflineCanFingerprints = Dict[str, List[Dict[int, int]]] - FW_VERSIONS = get_interface_attr('FW_VERSIONS', combine_brands=True, ignore_none=True) _FINGERPRINTS = get_interface_attr('FINGERPRINTS', combine_brands=True, ignore_none=True) _DEBUG_ADDRESS = {1880: 8} # reserved for debug purposes -def is_valid_for_fingerprint(msg, car_fingerprint: OfflineCanFingerprints): +def is_valid_for_fingerprint(msg, car_fingerprint: dict[int, int]): adr = msg.address # ignore addresses that are more than 11 bits return (adr in car_fingerprint and car_fingerprint[adr] == len(msg.dat)) or adr >= 0x800