From bc0298b35a24c22745683adeb93cdda8b305433a Mon Sep 17 00:00:00 2001 From: priestbh <105124854+priestbh@users.noreply.github.com> Date: Fri, 30 Dec 2022 14:43:00 -0500 Subject: [PATCH 1/2] Update comet.py to include a background color Update comet.py to include a background color other than BLACK --- adafruit_led_animation/animation/comet.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/adafruit_led_animation/animation/comet.py b/adafruit_led_animation/animation/comet.py index e562e49..6742c1a 100644 --- a/adafruit_led_animation/animation/comet.py +++ b/adafruit_led_animation/animation/comet.py @@ -51,6 +51,7 @@ class Comet(Animation): pixel_object, speed, color, + background_color=BLACK tail_length=0, reverse=False, bounce=False, @@ -68,6 +69,7 @@ class Comet(Animation): self._color_step = 0.95 / tail_length self._comet_colors = None self._computed_color = color + self._background_color = background_color self._num_pixels = len(pixel_object) self._direction = -1 if reverse else 1 self._left_side = -self._tail_length @@ -82,7 +84,7 @@ class Comet(Animation): on_cycle_complete_supported = True def _set_color(self, color): - self._comet_colors = [BLACK] + self._comet_colors = [self._background_color] for n in range(self._tail_length): self._comet_colors.append( calculate_intensity(color, n * self._color_step + 0.05) From 85e4d6ee1b85126c052ad61a04c2b17da9062602 Mon Sep 17 00:00:00 2001 From: priestbh <105124854+priestbh@users.noreply.github.com> Date: Fri, 30 Dec 2022 14:52:01 -0500 Subject: [PATCH 2/2] Update comet.py --- adafruit_led_animation/animation/comet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_led_animation/animation/comet.py b/adafruit_led_animation/animation/comet.py index 6742c1a..72b681a 100644 --- a/adafruit_led_animation/animation/comet.py +++ b/adafruit_led_animation/animation/comet.py @@ -51,7 +51,7 @@ class Comet(Animation): pixel_object, speed, color, - background_color=BLACK + background_color=BLACK, tail_length=0, reverse=False, bounce=False,