Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions can/io/blf.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,11 @@ def __iter__(self):
raise BLFParseError()

obj_size = header[3]
obj_type = header[4]
# Calculate position of next object
next_pos = pos + obj_size + (obj_size % 4)
next_pos = pos + obj_size
if obj_type != CAN_FD_MESSAGE_64:
next_pos += obj_size % 4
if next_pos > len(data):
# Object continues in next log container
break
Expand Down Expand Up @@ -239,7 +242,6 @@ def __iter__(self):
factor = 1e-9
timestamp = timestamp * factor + self.start_timestamp

obj_type = header[4]
# Both CAN message types have the same starting content
if obj_type in (CAN_MESSAGE, CAN_MESSAGE2):
(
Expand Down