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

Refactor MessageState to Use Msg Struct and Simplify Initialization #1071

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

deanlee
Copy link
Contributor

@deanlee deanlee commented Aug 1, 2024

Refactors the MessageState class to improve its structure and initialization process:

  1. Replaced multiple member variables with a single struct Msg to encapsulate message-related data. These member variables were essentially duplicates of the struct Msg's members.
  2. Added a constructor MessageState::MessageState to simplify the initialization process.
  3. Updated the code to use the new struct and constructor for better readability and maintainability.

This refactor enhances code clarity, reduces redundancy, and streamlines the initialization process.

@deanlee deanlee force-pushed the refactor_parser_ctor branch 2 times, most recently from a5ce472 to 58c43ea Compare August 1, 2024 16:34
@deanlee deanlee marked this pull request as draft August 1, 2024 16:36
@deanlee deanlee force-pushed the refactor_parser_ctor branch 2 times, most recently from 4e23ce1 to 74a4a4f Compare August 1, 2024 16:40
@deanlee deanlee marked this pull request as ready for review August 1, 2024 16:42
Copy link
Contributor

github-actions bot commented Aug 20, 2024

Thanks for contributing to opendbc! In order for us to review your PR as quickly as possible, check the following:

  • Convert your PR to a draft unless it's ready to review
  • Read the contributing docs
  • Before marking as "ready for review", ensure:
    • the goal is clearly stated in the description
    • all the tests are passing
    • include a route or your device' dongle ID if relevant

@github-actions github-actions bot added the can related to CAN tools, aka opendbc/can/ label Aug 20, 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.

1 participant