adafruit / Adafruit_CircuitPython_LED_Animation

CircuitPython helper library for LED colors and animations
MIT License
53 stars 43 forks source link

rainbowcomet: add missing arg initing base class #108

Closed tlyu closed 1 year ago

tlyu commented 1 year ago

In RainbowComet, the call to super().__init__() was missing the background_color argument. This caused strange effects when non-default arguments were passed.

For example, setting reverse=True resulted a red comet with a tail length of 1, and setting bounce=True resulted in a reversed rainbow comet.

tekktrik commented 1 year ago

Good catch! It looks like that argument is typically Tuple[int, int, int] though. Does this work if the provided argument is just int?

tlyu commented 1 year ago

I think so. It should take any input that is acceptable as an element of the contained pixels object, which I believe includes int.