adafruit / Adafruit_CircuitPython_ADS1x15

CircuitPython drivers for the ADS1x15 series of ADCs.
MIT License
140 stars 59 forks source link

Added Comparator functionality #98

Closed RoaCode closed 2 months ago

RoaCode commented 2 months ago

Enabled use of Comparator output by adding controls for the COMP_QUE fields in the Config Register. Also added an example of use.

RoaCode commented 2 months ago

Thanks for the feedback, @tannewt . I think I've addressed everything in the latest commit.

RoaCode commented 2 months ago

Comments addressed. I2C writes to threshold registers moved to setter functions, "threshold" spelled out in variables, and improved description in comments.

FoamyGuy commented 2 months ago

If you use the process in the guide here: https://learn.adafruit.com/improve-your-code-with-pylint/check-your-code-with-pre-commit to install pre-commit locally you can run it and it'll help you find and fix anything that the actions check will have issue with.

RoaCode commented 2 months ago

@FoamyGuy Thanks for the comment. I did have to change the pylint version (to v3.2.6 from v2.17.4) to get it to work, I believe because I am using python 3.12. I hope that is OK.

FoamyGuy commented 2 months ago

@RoaCode thank you!

Yes thats fine to change the pylint version for now. We're in the process of switching to use Ruff so this repo will get swapped over to that anyway. I've been contending with that same issue with pyt3.12 and pylint.