We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9f26602 commit b3a5a36Copy full SHA for b3a5a36
adafruit_apds9960/apds9960.py
@@ -202,6 +202,7 @@ def enable_gesture(self, enable_flag):
202
self._gesture_enable = enable_flag
203
204
def rotated_gesture(self, original_gesture):
205
+ """Applies rotation offset to the given gesture direction and returns the result"""
206
directions = [1, 4, 2, 3]
207
new_index = (directions.index(original_gesture) + self._rotation // 90) % 4
208
return directions[new_index]
0 commit comments