Skip to content

Add property style access to thresholds. #12

@caternuson

Description

@caternuson

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions