BLF and ASC log file fixes#291
Merged
christiansandberg merged 4 commits intohardbyte:developfrom Apr 10, 2018
Merged
Conversation
Add 1 to channel numbers (to avoid use of 0) Better handling of error frames Better handling of CAN FD frames Fixes hardbyte#279
Collaborator
|
Maybe we should merge #255 first and base this PR on it. |
felixdivo
approved these changes
Apr 8, 2018
|
|
||
| channel = msg.channel if isinstance(msg.channel, int) else self.channel | ||
| # Many interfaces start channel numbering at 0 which is invalid | ||
| channel = msg.channel + 1 if isinstance(msg.channel, int) else self.channel |
Collaborator
There was a problem hiding this comment.
We should probably do the reverse in the ASCReader. We could also try to parse self.channel as an int and then try to add one if it succeeded and was parsed as zero. That might be overkill though.
Collaborator
Author
There was a problem hiding this comment.
I'll add channel support to ASCReader as well.
Only adding 1 if the channel is 0 is problematic though since then channel 0 and 1 would be the same.
Collaborator
There was a problem hiding this comment.
Uhm yeah. Right. But something like that ^^
|
|
||
| log = logging.getLogger('can.util') | ||
|
|
||
| CAN_FD_DLC = [ |
Collaborator
There was a problem hiding this comment.
Maybe leave a comment that these are the allowed data lengths.
Collaborator
|
Looks fine to me. (y) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add 1 to channel numbers (to avoid use of 0 which is invalid)
Better handling of error frames in BLF
Better handling of CAN FD frames in BLF
Update of BLF binary format after changes in Toby's C++ library
Fixes #279