Skip to content

Commit bfc80e8

Browse files
author
caternuson
committed
docstrings for the linter
1 parent 5c6192a commit bfc80e8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

adafruit_mpr121.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,19 @@
8080
# pylint: enable=bad-whitespace
8181

8282
class MPR121_Channel():
83+
"""Helper class to represent a touch channel on the MPR121. Not meant to
84+
be used directly."""
8385
def __init__(self, mpr121, channel):
8486
self._mpr121 = mpr121
8587
self._channel = channel
8688

8789
@property
8890
def value(self):
91+
"""Whether the touch pad is being touched or not."""
8992
return self._mpr121.touched() & (1 << self._channel) != 0
9093

9194
@property
95+
"""The raw touch measurement."""
9296
def raw_value(self):
9397
return self._mpr121.filtered_data(self._channel)
9498

@@ -110,6 +114,7 @@ def __getitem__(self, key):
110114

111115
@property
112116
def touched_pins(self):
117+
"""A tuple of touched state for all pins."""
113118
touched = self.touched()
114119
return tuple([bool(touched >> i & 0x01) for i in range(12)])
115120

0 commit comments

Comments
 (0)