-
Notifications
You must be signed in to change notification settings - Fork 3
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
Added CAN Equation #328
Added CAN Equation #328
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Structure is looking better.
There are a lot of extra blank lines. Use blank lines to separate logical sections of code, not necessarily every line. For example there shouldn't be a blank line after a for
loop starts, and the data length function doesn't need any.
There will be a few more changes after these comments to set up proper testing and integration with the rest of cangen. You can start looking at poetry tests
Reach out to @AndrewI26. He set up automated code formatting with "ruff" which will help you
@ManushPatell just navigate to the directory with the python files you want to format then run |
I created a |
@ManushPatell Is this ready for re-review? You clicked resolve on all my comments but some of the changes weren't implemented |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost ready to merge. Just want to format the code to be consistent.
I added instructions for formatting code to the cangen/README
. Run that command and it should make some formatting changes to your files but will not affect the logic. Commit those changes and we're ready to merge.
FYI any sizable coding project will enforce formatting guidelines. For example, the firmware directory in racecar/
uses clang-format
and we have a GitHub Action which prevents code from being merged if it is unformatted. We could set up an Action for our python projects as well, but I don't think that's a good use of time, so we just have to be diligent and format the code manually with that command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still needs to be integrated into the cangen pipeline, but that will require a new CAN database format.
@BlakeFreer . I've included the CAN bus equation. I'm unsure about how the input will look, so I have included the test case structure I used, but I imagine it will be different.