Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified data slicing in BLFReader for when the object type is CAN_ME… #1825

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions can/io/blf.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def _parse_data(self, data):
is_remote_frame=bool(flags & REMOTE_FLAG),
is_rx=not bool(flags & DIR),
dlc=dlc,
data=can_data[:dlc],
data=can_data,
channel=channel - 1,
)
elif obj_type == CAN_ERROR_EXT:
Expand All @@ -290,7 +290,7 @@ def _parse_data(self, data):
is_extended_id=bool(can_id & CAN_MSG_EXT),
arbitration_id=can_id & 0x1FFFFFFF,
dlc=dlc,
data=can_data[:dlc],
data=can_data,
channel=channel - 1,
)
elif obj_type == CAN_FD_MESSAGE:
Expand Down
2 changes: 1 addition & 1 deletion can/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def equals(
and self.arbitration_id == other.arbitration_id
and self.is_extended_id == other.is_extended_id
and self.dlc == other.dlc
and self.data == other.data
and self.data[: self.dlc] == other.data[: other.dlc]
and self.is_remote_frame == other.is_remote_frame
and self.is_error_frame == other.is_error_frame
and (self.channel == other.channel or not check_channel)
Expand Down
Loading