-
-
Notifications
You must be signed in to change notification settings - Fork 557
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
Update LongNamesConverter on dbc.py #657
Conversation
The function to create short names is based on the smallest text (cut_name), but the check is done on longer text (short_name). When two signals differ only after the short_name, the index is resetted and two identical cut_name are created.
Restoring f-string on short_name after previous commit
Pull Request Test Coverage Report for Build 8643915571Details
💛 - Coveralls |
Could you provide some code example? i cannot reproduce your issue. |
You can run this script:
This will be the output:
As you can see, when the signal name are longer than 32 characters and are equal for the first 27 characters, but different from position 27 to position 32, the output of the convert function will be the same for different signal names, for example So in the message the translation from short name to long name will be wrong. |
Great example, thanks! |
I agree, they can be removed 👍 |
I assumed you'd remove them 😅 |
Closing in favor of #660 |
The function to create short names is based on the smallest text (cut_name), but the check is done on longer text (short_name).
When two signals differ only after the short_name, the index is resetted and two identical short_name are created creating a conflict.