tools: print VIN when getting UDS fingerprints from a route (#33750)

* tools: print VIN when getting UDS fingerprints

* set in case not there

---------

Co-authored-by: Shane Smiskol <shane@smiskol.com>
pull/33752/head
Jason Young 7 months ago committed by GitHub
parent 196fb0a7ea
commit 8b5df1e9ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      selfdrive/debug/fingerprint_from_route.py

@ -8,10 +8,12 @@ def get_fingerprint(lr):
# TODO: make this a nice tool for car ports. should also work with qlogs for FW # TODO: make this a nice tool for car ports. should also work with qlogs for FW
fw = None fw = None
vin = None
msgs = {} msgs = {}
for msg in lr: for msg in lr:
if msg.which() == 'carParams': if msg.which() == 'carParams':
fw = msg.carParams.carFw fw = msg.carParams.carFw
vin = msg.carParams.carVin
elif msg.which() == 'can': elif msg.which() == 'can':
for c in msg.can: for c in msg.can:
# read also msgs sent by EON on CAN bus 0x80 and filter out the # read also msgs sent by EON on CAN bus 0x80 and filter out the
@ -32,6 +34,7 @@ def get_fingerprint(lr):
print(f" {f.fwVersion},") print(f" {f.fwVersion},")
print(" ],") print(" ],")
print() print()
print(f"VIN: {vin}")
if __name__ == "__main__": if __name__ == "__main__":

Loading…
Cancel
Save