vin: reduce retries (#31175)

reduce retries
old-commit-hash: c99cd3251b
pull/32199/head
Shane Smiskol 1 year ago committed by GitHub
parent 43291c6324
commit 7c70aef5de
  1. 2
      selfdrive/car/tests/test_fw_fingerprint.py
  2. 2
      selfdrive/car/vin.py

@ -212,7 +212,7 @@ class TestFwFingerprintTiming(unittest.TestCase):
def test_startup_timing(self):
# Tests worse-case VIN query time and typical present ECU query time
vin_ref_time = 2.0
vin_ref_time = 1.2
present_ecu_ref_time = 0.75
def fake_get_ecu_addrs(*_, timeout):

@ -15,7 +15,7 @@ def is_valid_vin(vin: str):
return re.fullmatch(VIN_RE, vin) is not None
def get_vin(logcan, sendcan, buses, timeout=0.1, retry=5, debug=False):
def get_vin(logcan, sendcan, buses, timeout=0.1, retry=3, debug=False):
addrs = list(range(0x7e0, 0x7e8)) + list(range(0x18DA00F1, 0x18DB00F1, 0x100)) # addrs to process/wait for
valid_vin_addrs = [0x7e0, 0x7e2, 0x18da10f1, 0x18da0ef1] # engine, VMCU, 29-bit engine, PGM-FI
for i in range(retry):

Loading…
Cancel
Save