adafruit / Adafruit_CircuitPython_NeoPixel

CircuitPython drivers for neopixels.
MIT License
304 stars 98 forks source link

Pixelbuf support #74

Closed rhooper closed 4 years ago

rhooper commented 4 years ago

This MR adds support for _pixelbuf.

Notable is that this means .buf is gone. The way _pixelbuf works now means there is no .buf property. In theory we can emulate that with a @property.

tannewt commented 4 years ago

Thanks for adding this! I'd like to wait to merge until 5.x is stable because 4.x crashes.

dunkmann00 commented 4 years ago

Is this good to be merged now that CP is at 5.0?

dunkmann00 commented 4 years ago

@kattni Any plans for when this can be merged back in?

tannewt commented 4 years ago

@dunkmann00 We don't have any immediate plans though we should be able to do it. Maybe we can once @rhooper dusts off the PR? I may have a variant somewhere here too. It'd be good if it fell back to PyPixelBuf based on the CircuitPython major version instead of whether _pixelbuf is available.

dunkmann00 commented 4 years ago

@tannewt I'd love to help out with this if I could? I'm not sure how I would go about that though. Should I fork @rhooper's version and just fix the conflicts/fallback code and make sure it plays well with CP 5.0?

tannewt commented 4 years ago

@dunkmann00 That would be awesome! You can create your own branch based on his code and do a separate PR.

I also have these changes I made: https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel/compare/master...tannewt:update_for_pixelbuf

The main thing is to ensure it works well in 5.x and uses pypixelbuf in 4.x rather than crashing.

Thanks!