Skip to content

Commit 6298cd3

Browse files
authored
Update spinner_advanced.py
1 parent 3576f80 commit 6298cd3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/spinner_advanced.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def update(self, position, primary, secondary):
232232
# accelerometer is in FIFO stream mode it will keep a history of the
233233
# 32 last accelerometer readings and return them when consecutively
234234
# read.
235-
maxval = lis3dh.acceleration[0] # Grab just the X acceleration value.
235+
maxval = abs(lis3dh.acceleration[0]) # Grab just the X acceleration value.
236236
for i in range(31):
237237
x = abs(lis3dh.acceleration[0])
238238
if x > maxval:

0 commit comments

Comments
 (0)