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>
This commit is contained in:
Jason Young
2024-10-08 16:41:02 -04:00
committed by GitHub
parent 196fb0a7ea
commit 8b5df1e9ee
@@ -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
@@ -32,6 +34,7 @@ def get_fingerprint(lr):
print(f" {f.fwVersion},")
print(" ],")
print()
print(f"VIN: {vin}")
if __name__ == "__main__":