Skip to content
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

Support extended IDs and generate impls for embedded_can::Frame trait #82

Merged
merged 2 commits into from
Aug 21, 2024

Conversation

trnila
Copy link
Contributor

@trnila trnila commented Aug 19, 2024

  • upgraded can-dbc dependency to support parsing extended IDs
  • added new dependency on embedded_can interface crate
  • both standard and extended message IDs are represented by embedded_can::Id instead of u32 (Extended IDs from DBC file are not masked before code generation #66)
  • generate trait impls embedded_can::Frame for each frame, so id or data can be accessed in generic way

Fixes #66
Superceeds #71

Copy link
Member

@killercup killercup left a comment

Choose a reason for hiding this comment

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

Thanks! Looks good. I merged some other stuff now that results in merge conflicts. Can you fix those? Hope it's not a lot of work.

writeln!(
w,
"
impl embedded_can::Frame for {0} {{
Copy link
Member

Choose a reason for hiding this comment

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

Can we gate this with a feature flag?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added feature flag defaulting to Always as embedded_can crate dependency is required anyway for representing CAN frame IDs

@trnila
Copy link
Contributor Author

trnila commented Aug 21, 2024

Merge conflicts are resolved

Copy link
Member

@killercup killercup left a comment

Choose a reason for hiding this comment

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

Thanks for the quick update!

@killercup killercup merged commit b14c392 into technocreatives:main Aug 21, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extended IDs from DBC file are not masked before code generation
2 participants