Skip to content

Adding CAN FD 64 frame support to blf reader #568

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

Merged
merged 3 commits into from
May 13, 2019
Merged

Conversation

pierreluctg
Copy link
Collaborator

No description provided.

@codecov
Copy link

codecov bot commented May 3, 2019

Codecov Report

Merging #568 into develop will increase coverage by 0.13%.
The diff coverage is 58.33%.

@@             Coverage Diff             @@
##           develop     #568      +/-   ##
===========================================
+ Coverage    63.91%   64.04%   +0.13%     
===========================================
  Files           63       63              
  Lines         5708     5712       +4     
===========================================
+ Hits          3648     3658      +10     
+ Misses        2060     2054       -6

@felixdivo felixdivo added enhancement file-io about reading & writing to files labels May 4, 2019
bitrate_switch=bool(fd_flags & BRS_64),
error_state_indicator=bool(fd_flags & ESI_64),
dlc=length,
data=can_data[:length],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would probably be more efficient something like this instead of unpacking the raw data above:

data_offset = pos + CAN_FD_MSG_64_STRUCT.size

data[data_offset:data_offset + length]

Also I've realized it should really be the valid payload length and not the DLC to support remote frames correctly, but it is more of a sanity thing.

@felixdivo
Copy link
Collaborator

felixdivo commented May 7, 2019

Could we add such a CAN FD 64 frame to test/data/logfile.blf? Because the current change is not covered by any tests.

@felixdivo felixdivo added this to the 4.0 Release milestone May 12, 2019
@christiansandberg
Copy link
Collaborator

The test file was copied from Toby’s C++ library. Maybe we should create our own and check that it is correct in a Vector application. I however do not have access to one anymore.

@felixdivo
Copy link
Collaborator

Okay, so maybe just open a new issue for that and merge this PR?

Copy link
Collaborator

@christiansandberg christiansandberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sound good to me!

@felixdivo
Copy link
Collaborator

See #581.

@felixdivo felixdivo merged commit 0227849 into develop May 13, 2019
@felixdivo felixdivo deleted the BFL-CAN-FD-64 branch May 13, 2019 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement file-io about reading & writing to files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants