Added possibility to set BRS flag in SendFD #110
Merged
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.
Hi,
as a continuation of PR #106, I've re-synchronized my fork by latest version of node-can (PR #106 automatically closed), re-implemented the new code according to what was discussed and created this new PR.
Now, the new symbol for bitrate switching is called "fd_brs" and is boolean.
If set, the CANFD_BRS (defined in socket can kernel headers) is added to frameFD.flags when transmitting CAN-FD frame in SendFD method. This will allow users of node-can to perform bitrate switching in CAN-FD frames.
It's backward compatible. If no "fd_brs" symbol is existing, the frameFD.flags will be of value 0, as hardcoded before.
As discussed with @sebi2k1, this new feature is available in native only for now (proper integration of KCD is separated).
Thank you for possible acceptation of this PR and have a nice day!
Martin