diff --git a/adafruit_vc0706.py b/adafruit_vc0706.py index f871190..1acd1c6 100644 --- a/adafruit_vc0706.py +++ b/adafruit_vc0706.py @@ -225,11 +225,12 @@ def get_motion_detect(self): """Query the gesture detection status""" return self._run_command(_COMM_MOTION_STATUS, bytes([0x00]), 6) - def set_motion_detect(self, args): + def set_motion_detect(self, enabled): """Set gesture detection status. - args = 0 to unset, 1 to set + + :param bool enabled: False to disable motion detected, True to enable motion detection. """ - return self._run_command(_COMM_MOTION_CTRL, bytes([0x01, args]), 5) + return self._run_command(_COMM_MOTION_CTRL, bytes([0x01, enabled]), 5) def _run_command(self, cmd, args, resplen, flush=True): if flush: