Skip to content

feat: Support option for padding (set all unused bit to 1)#87

Open
wallem89 wants to merge 3 commits into
oxibus:mainfrom
wallem89:feature/support-padding-when-encoding
Open

feat: Support option for padding (set all unused bit to 1)#87
wallem89 wants to merge 3 commits into
oxibus:mainfrom
wallem89:feature/support-padding-when-encoding

Conversation

@wallem89

@wallem89 wallem89 commented Nov 5, 2024

Copy link
Copy Markdown

This feature is adding the support for padding. In other words the option to set all unused bits to 1 instead of 0. One use case is when creating SAE J1939 message in which all unused bits so be set to 1.

See also issue 86 .

@felixvanoost felixvanoost requested a review from trnila July 13, 2026 20:07
@felixvanoost

Copy link
Copy Markdown

I'm also interested in this feature. Any chance we can merge this?

@trnila trnila left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good, if there are not cases of mixed paddings within a single DBC file.

@wallem89 could you please resolve merge conflicts?

Comment thread src/lib.rs

/// Optional: Padding value used; set all unused bits to 1 if true else 0. Default: `false`.
#[builder(default)]
pub padding_value: bool,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

or padding_bit/unused_bit_value?

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.

3 participants