@@ -35,6 +35,7 @@ class MotionSensor(Device):
35
35
:param port: Port of device
36
36
:raises DeviceError: Occurs if there is no motion sensor attached to port
37
37
"""
38
+
38
39
default_mode = 0
39
40
40
41
def __init__ (self , port ):
@@ -48,8 +49,9 @@ def __init__(self, port):
48
49
49
50
def set_default_data_mode (self , mode ):
50
51
"""
51
- Set the mode most often queried from this device to significantly
52
- improve performance when repeatedly accessing data
52
+ Set the mode most often queried from this device.
53
+
54
+ This significantly improves performance when repeatedly accessing data
53
55
54
56
:param mode: 0 for distance (default), 1 for movement count
55
57
"""
@@ -68,9 +70,11 @@ def get_distance(self):
68
70
69
71
def get_movement_count (self ):
70
72
"""
71
- Return the movement counter: The count of how many times the sensor has
72
- detected an object that moved within 4 blocks of the sensor since the
73
- sensor has been plugged in or the BuildHAT reset
73
+ Return the movement counter
74
+
75
+ This is the count of how many times the sensor has detected an object
76
+ that moved within 4 blocks of the sensor since the sensor has been
77
+ plugged in or the BuildHAT reset
74
78
75
79
:return: Count of objects detected
76
80
:rtype: int
0 commit comments