diff --git a/can/io/blf.py b/can/io/blf.py index 515c375e2..c9aa7165f 100644 --- a/can/io/blf.py +++ b/can/io/blf.py @@ -312,8 +312,7 @@ def _parse_data(self, data): channel=channel - 1, ) elif obj_type == CAN_FD_MESSAGE_64: - members = unpack_can_fd_64_msg(data, pos)[:7] - channel, dlc, valid_bytes, _, can_id, _, fd_flags = members + channel, dlc, valid_bytes, _, can_id, _, fd_flags, _, _, _, _, _, direction, _, _ = unpack_can_fd_64_msg(data, pos) pos += can_fd_64_msg_size yield Message( timestamp=timestamp, @@ -321,6 +320,7 @@ def _parse_data(self, data): is_extended_id=bool(can_id & CAN_MSG_EXT), is_remote_frame=bool(fd_flags & 0x0010), is_fd=bool(fd_flags & 0x1000), + is_rx=not direction, bitrate_switch=bool(fd_flags & 0x2000), error_state_indicator=bool(fd_flags & 0x4000), dlc=dlc2len(dlc), diff --git a/test/logformats_test.py b/test/logformats_test.py index ae3106aa7..d8a06762e 100644 --- a/test/logformats_test.py +++ b/test/logformats_test.py @@ -632,6 +632,7 @@ def test_can_fd_message_64(self): channel=0x10, dlc=64, is_fd=True, + is_rx=False, bitrate_switch=True, error_state_indicator=True, )