adafruit / Adafruit_CircuitPython_Pypixelbuf

Pure python implementation of _pixelbuf for smaller boards
Other
4 stars 11 forks source link

Pypixelbuf: Delegate to _pixelbuf, make wheel() match it #33

Closed jepler closed 3 years ago

jepler commented 3 years ago

In the weekly meeting, we discussed adafruit_pypixelbuf vs _pixelbuf.

I realized that we can put the responsibility of delegating to the C-coded routines in the Python module, rather than pushing it on to modules that want to USE the libraries, and implement that here.

I also changed wheel and colorwheel to return a color number instead of a tuple, because this is what _pixelbuf.colorwheel does and because it is likely to be a bit faster (as it avoids allocations)

I placed the aliasing of wheel to colorwheel after the import because I didn't know that the core module also had this alias. It could be moved earlier, or (since it has been marked deprecated for a long time) it could be dropped and we could bump the major version number.