Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix creating a color packet with an int #36

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
Feb 8, 2023

Conversation

Neradoc
Copy link
Contributor

@Neradoc Neradoc commented Feb 8, 2023

Fixes creating a ColorPacket from an int (like rainbowio.colorwheel)

from adafruit_bluefruit_connect.color_packet import ColorPacket
c = ColorPacket(0xFF0080)
print(c.color)

Before:

code.py output:
Traceback (most recent call last):
  File "code.py", line 2, in <module>
  File "adafruit_bluefruit_connect/color_packet.py", line 37, in __init__
TypeError: can't convert str to int

After:

code.py output:
(255, 0, 128)

Copy link
Contributor

@dhalbert dhalbert left a comment

Choose a reason for hiding this comment

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

Thank you for fixing this long-standing bug!

@dhalbert dhalbert merged commit 863951f into adafruit:main Feb 8, 2023
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Feb 9, 2023
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