mirror of https://github.com/commaai/panda.git
Add message length column
This commit is contained in:
parent
bc7f21f1a4
commit
acf2377bb7
|
@ -24,7 +24,7 @@ def can_logger():
|
|||
outputfile = open('output.csv', 'wb')
|
||||
csvwriter = csv.writer(outputfile)
|
||||
#Write Header
|
||||
csvwriter.writerow(['Bus', 'MessageID', 'Message'])
|
||||
csvwriter.writerow(['Bus', 'MessageID', 'Message', 'MessageLength'])
|
||||
print("Writing csv file output.csv. Press Ctrl-C to exit...\n")
|
||||
|
||||
bus0_msg_cnt = 0
|
||||
|
@ -35,7 +35,7 @@ def can_logger():
|
|||
can_recv = p.can_recv()
|
||||
|
||||
for address, _, dat, src in can_recv:
|
||||
csvwriter.writerow([str(src), str(hex(address)), binascii.hexlify(dat)])
|
||||
csvwriter.writerow([str(src), str(hex(address)), binascii.hexlify(dat), len(dat)])
|
||||
|
||||
if src == 0:
|
||||
bus0_msg_cnt += 1
|
||||
|
|
Loading…
Reference in New Issue