-
Notifications
You must be signed in to change notification settings - Fork 33
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
Multiplexed signal implementation #33
Merged
killercup
merged 27 commits into
technocreatives:main
from
marcelbuesing:multiplexed-signals
Apr 15, 2021
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
9d7c103
Start multiplexed signal implementation
marcelbuesing 6d1f71b
Avoid debug fields for multiplexed signals
marcelbuesing d8cb3ab
Add lifetimes to enum structs
marcelbuesing 8f90116
Fix lifetimes
marcelbuesing 7b8e344
Include message name in enum name
marcelbuesing 628974b
Render multiplexed signals
marcelbuesing 172bbaf
Exchange HashSet, BtreeMap for BTreeSet, BTreeMap
marcelbuesing c619171
Update generated output
marcelbuesing e2d4cff
Shorten multiplexed enum variant name
marcelbuesing f3a2cc0
Update cantools generated code after dbc update
marcelbuesing 689f4dc
Add missing newlines
marcelbuesing 3f8ed45
Add switch index to generated multiplexed enum
marcelbuesing 8f0d4c5
Extract multiplexor signal rendering
marcelbuesing 1a3077f
Extract signal setter render fn
marcelbuesing 1abdffc
Add _raw suffix to signal setters
marcelbuesing 4c924ad
Add setters for multiplexed signals
marcelbuesing 04cc40b
Revert "Add _raw suffix to signal setters"
marcelbuesing 2599500
Exchange raw ref for owned type in multiplexer
marcelbuesing c47d708
Remove returning mut ref in setters
marcelbuesing d0573d3
Cleanup clippy warnings
marcelbuesing 28c33d8
Add cantools multiplexer packing test
marcelbuesing 863116a
Make multiplexor setter private
marcelbuesing d04d362
Return error on unknown multiplexor value
marcelbuesing 1ab3a37
Add multiplexor value to error
marcelbuesing 8dea322
Replace or_insert with or_insert_with
marcelbuesing e495937
Derive Default fur multiplexed structs
marcelbuesing c335bdf
Remove MULTIPLEXED_SWITCH_INDEX associated constant
marcelbuesing File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, looking at this again, do you think we should include the mulitplexor value? Can we always convert it to a u16 or something? Upside: Better debugging. Downside: Larger size of CanError type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I think it's safe to say that it should be possible to convert into u16. I would probably even assume you'll never need more than u8. I think it certainly helps to add the value, otherwise it's hard to debug. So I think it's worth the downside. Went with u16 now, but like i said i can not imagine a use case that requires more than u8 and if there is such a use case that would at least to a compile time error with the generated code.