Skip to content

rainbowcomet: add missing arg initing base class #108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 24, 2023

Conversation

tlyu
Copy link
Contributor

@tlyu tlyu commented Jan 22, 2023

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.

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.

Signed-off-by: Taylor Yu <code@argon.blue>
@tekktrik
Copy link
Member

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
Copy link
Contributor Author

tlyu commented Jan 24, 2023

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

Copy link
Member

@tekktrik tekktrik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks for confirming, that also matches that the color argument is also 0, and the neopixel object typing does confirm int is accepted as an element!

@tekktrik tekktrik merged commit b101ab8 into adafruit:main Jan 24, 2023
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jan 24, 2023
Updating https://github.com/adafruit/Adafruit_CircuitPython_IRRemote to 4.1.13 from 4.1.12:
  > Add upload url to release action
  > Merge pull request adafruit/Adafruit_CircuitPython_IRRemote#61 from tekktrik/main

Updating https://github.com/adafruit/Adafruit_CircuitPython_MCP3xxx to 1.4.14 from 1.4.13:
  > Merge pull request adafruit/Adafruit_CircuitPython_MCP3xxx#40 from tcfranks/main
  > Add upload url to release action
  > Add .venv to .gitignore

Updating https://github.com/adafruit/Adafruit_CircuitPython_PCD8544 to 1.2.13 from 1.2.12:
  > Merge pull request adafruit/Adafruit_CircuitPython_PCD8544#17 from tcfranks/main
  > Add upload url to release action
  > Add .venv to .gitignore
  > Update .pylintrc for v2.15.5
  > Fix release CI files
  > Update pylint to 2.15.5
  > Updated pylint version to 2.13.0
  > Switching to composite actions

Updating https://github.com/adafruit/Adafruit_CircuitPython_TCA9548A to 0.7.0 from 0.6.5:
  > Add upload url to release action
  > Merge pull request adafruit/Adafruit_CircuitPython_TCA9548A#43 from adafruit/pca9546a_update
  > Add .venv to .gitignore

Updating https://github.com/adafruit/Adafruit_CircuitPython_Wiznet5k to 1.13.5 from 1.13.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_Wiznet5k#88 from e28eta/patch-1
  > Add upload url to release action

Updating https://github.com/adafruit/Adafruit_CircuitPython_AzureIoT to 2.5.13 from 2.5.12:
  > Merge pull request adafruit/Adafruit_CircuitPython_AzureIoT#56 from MathCatsAnd/ssl-compatibility
  > Add upload url to release action
  > Add .venv to .gitignore

Updating https://github.com/adafruit/Adafruit_CircuitPython_LED_Animation to 2.6.4 from 2.6.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_LED_Animation#108 from tlyu/rainbowcomet-init
  > Merge pull request adafruit/Adafruit_CircuitPython_LED_Animation#109 from tlyu/comet-doc
  > Add upload url to release action

Updating https://github.com/adafruit/Adafruit_CircuitPython_MagTag to 2.2.4 from 2.2.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_MagTag#90 from FoamyGuy/pin_alarm_example
  > Add upload url to release action
  > Add .venv to .gitignore
  > Update .pylintrc for v2.15.5
  > Fix release CI files
  > Update pylint to 2.15.5
  > Updated pylint version to 2.13.0
  > Switching to composite actions

Updating https://github.com/adafruit/Adafruit_CircuitPython_Bundle/circuitpython_library_list.md to NA from NA:
  > Updated download stats for the libraries
@tlyu tlyu deleted the rainbowcomet-init branch January 25, 2023 04:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants