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

Why does the capitalization of signal names change #638

Open
wangguodong-f opened this issue Dec 29, 2023 · 2 comments
Open

Why does the capitalization of signal names change #638

wangguodong-f opened this issue Dec 29, 2023 · 2 comments

Comments

@wangguodong-f
Copy link

In my dbc file, the signal name is capitalized, but in the generated c source file, the signal name becomes lowercase. why ?

@andlaus
Copy link
Member

andlaus commented Dec 29, 2023

this is basically a matter of taste: In C, camelCase is often frowned upon. Also, as I see it, the C source code generator should rather be considered as a template of how to implement such functionality and not as a one-size-fits-all ready-to-use tool. (On that matter I personally would warmly recommend using a template engine such as jinja for implementing your own code generator instead of doing it the hard way like the shipped one.)

Also, if a given functionality is not of sufficient general interest, I am hesitant to accept patches adding new parameters for such things in order to avoid having a gazillion parameters complicating the generator for niche use cases...

@timrulebosch
Copy link

Hi @andlaus,

we are a bit interested :-) Our workflows would benefit from having some control on the emitted C code (i.e. not changing the variables at all). If there is a way we can achieve that, it would be very nice.

I opened an issue #644 and we are developing modification to achieve that. We would be happy to work on a PR.

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

3 participants