Interleave VIN queries (#25090)
Interleave the two requests old-commit-hash: 4c493237d52525d2effb95b5cda96b36a684303c
This commit is contained in:
@@ -18,8 +18,8 @@ VIN_UNKNOWN = "0" * 17
|
||||
|
||||
|
||||
def get_vin(logcan, sendcan, bus, timeout=0.1, retry=5, debug=False):
|
||||
for request, response in ((UDS_VIN_REQUEST, UDS_VIN_RESPONSE), (OBD_VIN_REQUEST, OBD_VIN_RESPONSE)):
|
||||
for i in range(retry):
|
||||
for i in range(retry):
|
||||
for request, response in ((UDS_VIN_REQUEST, UDS_VIN_RESPONSE), (OBD_VIN_REQUEST, OBD_VIN_RESPONSE)):
|
||||
try:
|
||||
query = IsoTpParallelQuery(sendcan, logcan, bus, FUNCTIONAL_ADDRS, [request, ], [response, ], functional_addr=True, debug=debug)
|
||||
for addr, vin in query.get_data(timeout).items():
|
||||
|
||||
Reference in New Issue
Block a user