Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'main' into dev/convert-to-properties
  • Loading branch information
tekktrik authored Apr 21, 2022
commit dc135ac4daff36b7c12b5ea4e8865dc939bc6e64
6 changes: 3 additions & 3 deletions adafruit_vc0706.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,20 +222,20 @@ def read_picture_into(self, buf: circuitpython_typing.WriteableBuffer) -> int:
return n

@property
def motion_detected(self):
def motion_detected(self) -> bool:
"""Whether a gesture was detected"""
self._read_response(self._buffer, len(self._buffer))
if not self._verify_response(_COMM_MOTION_DETECTED):
return False
return True

@property
def motion_detection(self):
def motion_detection(self) -> bool:
"""The gesture detection status"""
return self._run_command(_COMM_MOTION_STATUS, bytes([0x00]), 6)

@motion_detection.setter
def motion_detection(self, enabled):
def motion_detection(self, enabled: bool) -> bool:
return self._run_command(_COMM_MOTION_CTRL, bytes([0x01, enabled]), 5)

def _run_command(
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.