From 73e68010aed94cd6bbe682f9b0cdd7af9e83bd66 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Mon, 8 Apr 2024 16:36:13 -0700 Subject: [PATCH] VW: get VIN from camera without comma power (#31851) * add VW camera to VIN addrs * correct VW query * consistent * update refs old-commit-hash: 22aa9a436dcd6434706931a78d6381e2fc66d78b --- selfdrive/car/tests/test_fw_fingerprint.py | 2 +- selfdrive/car/vin.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/selfdrive/car/tests/test_fw_fingerprint.py b/selfdrive/car/tests/test_fw_fingerprint.py index eaef1677e7..4a17fc34ec 100755 --- a/selfdrive/car/tests/test_fw_fingerprint.py +++ b/selfdrive/car/tests/test_fw_fingerprint.py @@ -236,7 +236,7 @@ class TestFwFingerprintTiming(unittest.TestCase): def test_startup_timing(self): # Tests worse-case VIN query time and typical present ECU query time - vin_ref_times = {'worst': 1.2, 'best': 0.6} # best assumes we go through all queries to get a match + vin_ref_times = {'worst': 1.4, 'best': 0.7} # best assumes we go through all queries to get a match present_ecu_ref_time = 0.75 def fake_get_ecu_addrs(*_, timeout): diff --git a/selfdrive/car/vin.py b/selfdrive/car/vin.py index e668c35f7d..e8c9c58042 100755 --- a/selfdrive/car/vin.py +++ b/selfdrive/car/vin.py @@ -23,6 +23,7 @@ def get_vin(logcan, sendcan, buses, timeout=0.1, retry=2, debug=False): (StdQueries.OBD_VIN_REQUEST, StdQueries.OBD_VIN_RESPONSE, (0, 1), STANDARD_VIN_ADDRS, FUNCTIONAL_ADDRS, 0x8), (StdQueries.GM_VIN_REQUEST, StdQueries.GM_VIN_RESPONSE, (0,), [0x24b], None, 0x400), # Bolt fwdCamera (StdQueries.KWP_VIN_REQUEST, StdQueries.KWP_VIN_RESPONSE, (0,), [0x797], None, 0x3), # Nissan Leaf VCM + (StdQueries.UDS_VIN_REQUEST, StdQueries.UDS_VIN_RESPONSE, (0,), [0x74f], None, 0x6a), # Volkswagen fwdCamera ): if bus not in valid_buses: continue