File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
adafruit_led_animation/animation Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ def __init__(
5151 pixel_object ,
5252 speed ,
5353 color ,
54+ background_color = BLACK ,
5455 tail_length = 0 ,
5556 reverse = False ,
5657 bounce = False ,
@@ -68,6 +69,7 @@ def __init__(
6869 self ._color_step = 0.95 / tail_length
6970 self ._comet_colors = None
7071 self ._computed_color = color
72+ self ._background_color = background_color
7173 self ._num_pixels = len (pixel_object )
7274 self ._direction = - 1 if reverse else 1
7375 self ._left_side = - self ._tail_length
@@ -82,7 +84,7 @@ def __init__(
8284 on_cycle_complete_supported = True
8385
8486 def _set_color (self , color ):
85- self ._comet_colors = [BLACK ]
87+ self ._comet_colors = [self . _background_color ]
8688 for n in range (self ._tail_length ):
8789 self ._comet_colors .append (
8890 calculate_intensity (color , n * self ._color_step + 0.05 )
You can’t perform that action at this time.
0 commit comments