Simplify CAN callbacks to use bytes rather than 32-bit words #112
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.
Virtually all CAN callbacks cast the two 32-bit words the libopeninv library presents an incoming CAN
frame in to bytes. Rather than repeat this cast all over the place replace with one central cast and change the interface of the DecodeCAN callback methods.
The exceptions which require reverse casts of byte- arrays back to 32-bit words are:
These could be changed to access the bytes directly but this would require greater understanding and testing of the code.
The changes are mechanical in nature and should not affect the operation of the code.
Where applicable "override" is used for virtual methods to make it clear to the compiler that virtual functions are being overridden.
Tests: