Skip to content

Commit 7ac5968

Browse files
committed
fix reverse flag
1 parent 4621212 commit 7ac5968

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_led_animation/animation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ def __init__(self, pixel_object, speed, color, size=1, spacing=3, reverse=False)
394394
self._repeat_width = size + spacing
395395
self._num_repeats = len(pixel_object) // self._repeat_width
396396
self._overflow = len(pixel_object) % self._repeat_width
397-
self._direction = 1
397+
self._direction = 1 if not reverse else -1
398398
self._reverse = reverse
399399
self._n = 0
400400
super(Chase, self).__init__(pixel_object, speed, color)

0 commit comments

Comments
 (0)