You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tested on MagTag, PyBadge, CPX and QT Py. The issue is not present on QT Py which requires adafruit_pypixelbuf. It is present on all other boards, which may narrow it down to an issue in _pixelbuf.
Used simple code that uses board.NEOPIXEL to turn the pixels red, and then tested brightness:
Setting brightness = 0 makes the on-board NeoPixels max brightness. They are the appropriate color when this occurs (as in they are not getting incorrect color info).
Setting brightness = 0.1 makes them dim.
Setting brightness = 0.0 shuts them off, though that's likely because it thinks it's something like 0.000000001 and they're not actually "off" but the LEDs or human eyes can't handle that level of dimness.
The text was updated successfully, but these errors were encountered:
i can reproduce this using a custom build on a QT Py that adds the native _pixelbuf. it does not occur using brightness=0 in the constructor:
importboardimportneopixelnp=neopixel.NeoPixel(board.NEOPIXEL, 1, brightness=0)
# no change visible yetnp[0] = (100,0,0)
# now turned offnp.brightness=0# back to full on
changing the setter to use mp_obj_get_float() instead of mp_obj_float_get() does seem to fix the error, but it will add some cycles. changing the bitmath might be another option but i don't have any suggestions as to how.
Tested on MagTag, PyBadge, CPX and QT Py. The issue is not present on QT Py which requires
adafruit_pypixelbuf
. It is present on all other boards, which may narrow it down to an issue in_pixelbuf
.Used simple code that uses
board.NEOPIXEL
to turn the pixels red, and then tested brightness:Setting
brightness = 0
makes the on-board NeoPixels max brightness. They are the appropriate color when this occurs (as in they are not getting incorrect color info).Setting
brightness = 0.1
makes them dim.Setting
brightness = 0.0
shuts them off, though that's likely because it thinks it's something like0.000000001
and they're not actually "off" but the LEDs or human eyes can't handle that level of dimness.The text was updated successfully, but these errors were encountered: