From de67a28f1bae5f3677c57ed179baf8bf9c1d971d Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Tue, 4 Oct 2022 19:21:23 -0700 Subject: [PATCH] Ford: handle VIN (#25966) fix ford vin --- selfdrive/car/vin.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/selfdrive/car/vin.py b/selfdrive/car/vin.py index 50c2abde46..ee40cf298a 100755 --- a/selfdrive/car/vin.py +++ b/selfdrive/car/vin.py @@ -27,6 +27,9 @@ def get_vin(logcan, sendcan, bus, timeout=0.1, retry=5, debug=False): for addr in valid_vin_addrs: vin = results.get((addr, None)) if vin is not None: + # Ford pads with null bytes + vin = vin.replace(b'\x00', b'') + # Honda Bosch response starts with a length, trim to correct length if vin.startswith(b'\x11'): vin = vin[1:18]