-
Notifications
You must be signed in to change notification settings - Fork 100
Closed
Description
If NeoPixels are created without specifying a bpp or a pixel_order:
pixels = neopixel.NeoPixel(board.D18, 8)then this would get used:
Adafruit_CircuitPython_NeoPixel/neopixel.py
Lines 94 to 96 in c0bdd8b
| if pixel_order is None: | |
| self.order = GRBW | |
| self.bpp = bpp |
and
bpp=3 by default:
def __init__(self, pin, n, *, bpp=3, brightness=1.0, auto_write=True, pixel_order=None):so you end up with bpp=3 and GRBW for pixel_order, which is bpp=4.
This is my bad, since it was introduced with #24 to fix #1. I think there was some attempt to maintain backwards compatibility with the older style of using bpp only. So that's why both bpp and pixel_order are still there:
#1 (comment)
But might be good to somehow check and protect against this:
https://forums.adafruit.com/viewtopic.php?f=47&t=151980
Metadata
Metadata
Assignees
Labels
No labels