Adding 0x to message to Excel doesn't trim leading zeros

This commit is contained in:
Adam Urban 2017-11-04 18:37:17 -04:00 committed by George Hotz
parent acf2377bb7
commit 1a7b95e684
1 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ def can_logger():
p = Panda() p = Panda()
except AssertionError: except AssertionError:
print("USB connection failed. Tryining WiFi...") print("USB connection failed. Trying WiFi...")
try: try:
p = Panda("WIFI") p = Panda("WIFI")
@ -35,7 +35,7 @@ def can_logger():
can_recv = p.can_recv() can_recv = p.can_recv()
for address, _, dat, src in can_recv: for address, _, dat, src in can_recv:
csvwriter.writerow([str(src), str(hex(address)), binascii.hexlify(dat), len(dat)]) csvwriter.writerow([str(src), str(hex(address)), "0x" + binascii.hexlify(dat), len(dat)])
if src == 0: if src == 0:
bus0_msg_cnt += 1 bus0_msg_cnt += 1