From 53544072658435c6e07a47fb79eb332e0c586e32 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Mon, 4 Apr 2022 11:56:07 -0500 Subject: [PATCH] set motion detection docstring and argument name --- adafruit_vc0706.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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: