Skip to content

BLF and ASC log file fixes#291

Merged
christiansandberg merged 4 commits intohardbyte:developfrom
christiansandberg:log-file-fix
Apr 10, 2018
Merged

BLF and ASC log file fixes#291
christiansandberg merged 4 commits intohardbyte:developfrom
christiansandberg:log-file-fix

Conversation

@christiansandberg
Copy link
Copy Markdown
Collaborator

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

Add 1 to channel numbers (to avoid use of 0)
Better handling of error frames
Better handling of CAN FD frames
Fixes hardbyte#279
@felixdivo
Copy link
Copy Markdown
Collaborator

Maybe we should merge #255 first and base this PR on it.

Comment thread can/io/asc.py

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
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Uhm yeah. Right. But something like that ^^

Comment thread can/util.py

log = logging.getLogger('can.util')

CAN_FD_DLC = [
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe leave a comment that these are the allowed data lengths.

@felixdivo
Copy link
Copy Markdown
Collaborator

Looks fine to me. (y)

@christiansandberg christiansandberg merged commit afcc678 into hardbyte:develop Apr 10, 2018
@christiansandberg christiansandberg deleted the log-file-fix branch April 10, 2018 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants