Skip to content

Commit

Permalink
Didn't have all the flake8 checkers installed
Browse files Browse the repository at this point in the history
  • Loading branch information
mutesplash committed Sep 12, 2023
1 parent a0981fc commit e2b9a79
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions buildhat/wedo.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class MotionSensor(Device):
:param port: Port of device
:raises DeviceError: Occurs if there is no motion sensor attached to port
"""

default_mode = 0

def __init__(self, port):
Expand All @@ -48,8 +49,9 @@ def __init__(self, port):

def set_default_data_mode(self, mode):
"""
Set the mode most often queried from this device to significantly
improve performance when repeatedly accessing data
Set the mode most often queried from this device.
This significantly improves performance when repeatedly accessing data
:param mode: 0 for distance (default), 1 for movement count
"""
Expand All @@ -68,9 +70,11 @@ def get_distance(self):

def get_movement_count(self):
"""
Return the movement counter: The count of how many times the sensor has
detected an object that moved within 4 blocks of the sensor since the
sensor has been plugged in or the BuildHAT reset
Return the movement counter
This is the count of how many times the sensor has detected an object
that moved within 4 blocks of the sensor since the sensor has been
plugged in or the BuildHAT reset
:return: Count of objects detected
:rtype: int
Expand Down

0 comments on commit e2b9a79

Please sign in to comment.