mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-19 08:12:07 +08:00
vin: reduce retries (#31175)
reduce retries old-commit-hash: c99cd3251b6a283be43fd301273baf78553c9c43
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user