mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-29 10:32:10 +08:00
correctly parse UDS VIN response for Honda Bosch (#24710)
old-commit-hash: dc2172b55e1e848476eceb014d8e3eea82c7eb5a
This commit is contained in:
@@ -23,6 +23,11 @@ def get_vin(logcan, sendcan, bus, timeout=0.1, retry=5, debug=False):
|
||||
try:
|
||||
query = IsoTpParallelQuery(sendcan, logcan, bus, FUNCTIONAL_ADDRS, [request, ], [response, ], functional_addr=True, debug=debug)
|
||||
for addr, vin in query.get_data(timeout).items():
|
||||
|
||||
# Honda Bosch response starts with a length, trim to correct length
|
||||
if vin.startswith(b'\x11'):
|
||||
vin = vin[1:18]
|
||||
|
||||
return addr[0], vin.decode()
|
||||
print(f"vin query retry ({i+1}) ...")
|
||||
except Exception:
|
||||
|
||||
Reference in New Issue
Block a user