Skip to content

Commit 24ce693

Browse files
authored
Fix animation example
1 parent d40c67e commit 24ce693

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/Berry_Addressable-LED.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class Rainbow_stripes : Leds_animator
9999
super(self).init(strip)
100100
self.cur_offset = 0
101101
# add an animator to change `self.cur_offset` to each value of the palette
102-
self.add_anim(animate.rotate(def(v) self.cur_offset = v end, 0, size(self.palette), int(duration * 1000)))
102+
self.add_anim(animate.rotate(def(v) self.cur_offset = v end, 0, size(self.palette) - 1, int(duration * 1000)))
103103
end
104104
105105
def animate()

0 commit comments

Comments
 (0)