Skip to content

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
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request May 13, 2025
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