Skip to content

basic refactoring to remove errors #1

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

Merged
merged 7 commits into from
May 5, 2025
Merged

Conversation

bablokb
Copy link
Contributor

@bablokb bablokb commented Dec 16, 2024

This is currently a draft PR: I refactored large parts of the code to make it at least error free from the Python perspective. I still have to setup the device and actually test it, but the current code definitely does not run (just run pylint, see all the errors and you know why).

Main changes: I moved a lot of the code from the container class INA3221 to the INA3221Channel class. This not only simplifies logic and removes errors, but also follows usual OO design best practices (e.g. keep properties and related code where they belong).

More to come (probably next year)...

@bablokb
Copy link
Contributor Author

bablokb commented Apr 7, 2025

So this is now tested and ready to merge. It fixes a number of things (syntax wise and logic-wise), cleans the code and makes the API consistent with the INA219 library.

@ladyada ladyada requested a review from BlitzCityDIY May 4, 2025 16:21
@BlitzCityDIY BlitzCityDIY merged commit c1a7316 into adafruit:main May 5, 2025
1 check passed
@bablokb bablokb deleted the refactor branch May 5, 2025 13:17
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

Successfully merging this pull request may close these issues.

2 participants