Skip to content

Commit 9f30939

Browse files
Correct index value calculation from pot input
Fix reading of pot input to correctly determine index value.
1 parent af46c8a commit 9f30939

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/rangeslicer_rotary_switch_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
while True:
5454
new_index = int(
55-
pot.range_slicer(pot_input.value)
55+
pot.range_slicer(pot_input.value)[0]
5656
) # read pot and determine the index value
5757

5858
if new_index != old_index: # compare old and new; did the index value change?

0 commit comments

Comments
 (0)