Skip to content

Commit

Permalink
tools: print VIN when getting UDS fingerprints from a route (commaai#…
Browse files Browse the repository at this point in the history
…33750)

* tools: print VIN when getting UDS fingerprints

* set in case not there

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
  • Loading branch information
2 people authored and cydia2020 committed Oct 9, 2024
1 parent bc188ee commit 5f5ade3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions selfdrive/debug/fingerprint_from_route.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ def get_fingerprint(lr):
# TODO: make this a nice tool for car ports. should also work with qlogs for FW

fw = None
vin = None
msgs = {}
for msg in lr:
if msg.which() == 'carParams':
fw = msg.carParams.carFw
vin = msg.carParams.carVin
elif msg.which() == 'can':
for c in msg.can:
# read also msgs sent by EON on CAN bus 0x80 and filter out the
Expand All @@ -32,6 +34,7 @@ def get_fingerprint(lr):
print(f" {f.fwVersion},")
print(" ],")
print()
print(f"VIN: {vin}")


if __name__ == "__main__":
Expand Down

0 comments on commit 5f5ade3

Please sign in to comment.