mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-28 01:52:06 +08:00
VIN: make Ford exception more explicit (#25972)
* Update vin.py * only replace from end old-commit-hash: 7ed064f7baff36b08713729c9c99304ef0224a58
This commit is contained in:
@@ -28,7 +28,8 @@ def get_vin(logcan, sendcan, bus, timeout=0.1, retry=5, debug=False):
|
||||
vin = results.get((addr, None))
|
||||
if vin is not None:
|
||||
# Ford pads with null bytes
|
||||
vin = vin.replace(b'\x00', b'')
|
||||
if len(vin) == 24:
|
||||
vin = re.sub(b'\x00*$', b'', vin)
|
||||
|
||||
# Honda Bosch response starts with a length, trim to correct length
|
||||
if vin.startswith(b'\x11'):
|
||||
|
||||
Reference in New Issue
Block a user