Skip to content

Commit c13715b

Browse files
authored
Merge pull request #23 from FoamyGuy/doc_strings
set_motion_detection docstring and argument name
2 parents 79696fd + 5354407 commit c13715b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

adafruit_vc0706.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,12 @@ def get_motion_detect(self):
225225
"""Query the gesture detection status"""
226226
return self._run_command(_COMM_MOTION_STATUS, bytes([0x00]), 6)
227227

228-
def set_motion_detect(self, args):
228+
def set_motion_detect(self, enabled):
229229
"""Set gesture detection status.
230-
args = 0 to unset, 1 to set
230+
231+
:param bool enabled: False to disable motion detected, True to enable motion detection.
231232
"""
232-
return self._run_command(_COMM_MOTION_CTRL, bytes([0x01, args]), 5)
233+
return self._run_command(_COMM_MOTION_CTRL, bytes([0x01, enabled]), 5)
233234

234235
def _run_command(self, cmd, args, resplen, flush=True):
235236
if flush:

0 commit comments

Comments
 (0)