Skip to content

Commit 0f8dc4f

Browse files
author
Tuan Nguyen
committed
Add function docstring
1 parent 3e25f50 commit 0f8dc4f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

adafruit_vc0706.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,15 +214,20 @@ def read_picture_into(self, buf):
214214
return n
215215

216216
def motion_detected(self):
217+
"""Read the gesture detection result"""
217218
self._read_response(self._buffer, len(self._buffer))
218219
if not self._verify_response(_COMM_MOTION_DETECTED):
219-
return False
220+
return False
220221
return True
221222

222223
def get_motion_detect(self):
224+
"""Query the gesture detection status"""
223225
return self._run_command(_COMM_MOTION_STATUS, bytes([0x00]), 6)
224226

225227
def set_motion_detect(self, args):
228+
"""Set gesture detection status
229+
args = 0 to unset, 1 to set
230+
"""
226231
return self._run_command(_COMM_MOTION_CTRL, bytes([0x01, args]), 5)
227232

228233
def _run_command(self, cmd, args, resplen, flush=True):

0 commit comments

Comments
 (0)