Skip to content

Add property style access to thresholds. #12

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

Closed
caternuson opened this issue Oct 17, 2018 · 3 comments
Closed

Add property style access to thresholds. #12

caternuson opened this issue Oct 17, 2018 · 3 comments
Assignees

Comments

@caternuson
Copy link
Contributor

caternuson commented Oct 17, 2018

Can either replace set_thresholds() or add new functionality.

# Global
thresholds = mpr121.thresholds    # return a 12 tuple of tuples (touch, release)
mpr121.thresholds = (0x42, 0x23)  # set all 12 to (touch, release)
# Per channel
chan0_thresholds = mpr121[0].thresholds   # return tuple (touch, release)
mpr121[0].thresholds = (0x42, 0x23)       # set to (touch, release)

Some way of individually setting touch and release would be nice too. Maybe?

mpr121.thesholds.touch = 0x42
mpr121.thesholds.release = 0x23
@caternuson caternuson self-assigned this Oct 17, 2018
@caternuson
Copy link
Contributor Author

When working this one, be aware of #11

@caternuson
Copy link
Contributor Author

Done with #14

@ladyada
Copy link
Member

ladyada commented Nov 20, 2018

amazing!

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

No branches or pull requests

2 participants