Skip to content

Commit 37e9190

Browse files
authored
Merge pull request #33 from rhooper/fix-rainbow-comet-on-pi
fix for RainbowComet on regular python (Fixes #32)
2 parents ad00c4b + 6433e78 commit 37e9190

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

adafruit_led_animation/animation/comet.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def __init__(
9494
def _recompute_color(self, color):
9595
pass
9696

97-
def __recompute_color(self, color):
97+
def _comet_recompute_color(self, color):
9898
self._comet_colors = [BLACK] + [
9999
[
100100
int(color[rgb] * ((n * self._color_step) + self._color_offset))
@@ -115,7 +115,7 @@ def _comet_generator(self):
115115
cycle_passes = 0
116116
while True:
117117
if self._color != self._computed_color or not self._comet_colors:
118-
self.__recompute_color(self._color)
118+
self._comet_recompute_color(self._color)
119119
colors = self._reverse_comet_colors if self.reverse else self._comet_colors
120120
for start in self._get_range(num_pixels):
121121

adafruit_led_animation/animation/rainbowcomet.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def _calc_brightness(self, n, color):
8484
color = (color & 0xFF, ((color & 0xFF00) >> 8), (color >> 16))
8585
return [int(i * brightness) for i in color]
8686

87-
def __recompute_color(self, color):
87+
def _comet_recompute_color(self, color):
8888
factor = int(256 / self._tail_length)
8989
self._comet_colors = [BLACK] + [
9090
self._calc_brightness(

0 commit comments

Comments
 (0)