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

CANParser: Initialize value dicts directly from DBC Msg #1381

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

deanlee
Copy link
Contributor

@deanlee deanlee commented Oct 16, 2024

This PR simplifies the initialization process of CANParser by directly initializing value dicts from the DBC Msg struct in the constructor. This eliminates the previous reliance on calling sef.update_strings([]) to perform this initialization.

These changes streamline the initialization flow and clarify the logic, It also resolves issue #913, where update_strings([]) returned the latest state when passed an empty list. A new test case, test_parser_empty_list(), has been added to verify that this issue is fixed and to ensure proper behavior when an empty list is used.

This PR also lays the groundwork for resolving two related issues: #1068 and #1066. With this update, addressing these issues will become simpler and more efficient.

@github-actions github-actions bot added the can related to CAN tools, aka opendbc/can/ label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
can related to CAN tools, aka opendbc/can/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CANParser: update_strings returns latest state when passed empty list
1 participant