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 option to set all unused bits to 1 when creating a new instance of a CAN message #86

Open
wallem89 opened this issue Oct 29, 2024 · 1 comment

Comments

@wallem89
Copy link

in the current implementation only the signals that are part of a message are set. The unused bits are not set. Which makes sense because there are not used.

But when using this codegen for SAE J1939 CAN messages this doesn't work. Because unused bits should be set to 1 according to this standard.

When looking at cantools for Python an option padding can be used during encoding of a messages. See:
https://cantools.readthedocs.io/en/latest/#cantools.database.can.Database.encode_message

My proposal is that padding will be an optional argument for the new function which is default false.

@wallem89
Copy link
Author

wallem89 commented Nov 5, 2024

I open PR #86 which adds an option for padding when creating a new CAN messages.

@wallem89 wallem89 changed the title Have an option to set all unused bits when creating a new instance of a CAN message for SAE J1939 support Support option to set all unused bits to 1 when creating a new instance of a CAN message Nov 6, 2024
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

No branches or pull requests

1 participant