Skip to content

Commit

Permalink
Sort output of can_bit_transition script numerically (commaai#1785)
Browse files Browse the repository at this point in the history
  • Loading branch information
nworb-cire authored Dec 29, 2023
1 parent 114b85a commit 0bcaa73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/can_bit_transition.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def PrintUnique(log_file, low_range, high_range):
high.load(log_file, start, end)
# print messages that go from low to high
found = False
for message_id in sorted(high.messages):
for message_id in sorted(high.messages, key=lambda x: int(x.split(':')[1], 16)):
if message_id in low.messages:
high.messages[message_id].printBitDiff(low.messages[message_id])
found = True
Expand Down

0 comments on commit 0bcaa73

Please sign in to comment.