Closed Viicos closed 1 year ago
Thank you for taking the time to do this!
I think you're probably right. This is some pretty legacy code that - to be frank - not much consideration went to at the time I grabbed it and packaged it up into a Python module. As long as the interface doesn't break, any change is probably a change for the better.
I'm aiming to release v5.0.0 of this library imminently to incorporate the unceremonious v1.0.0 release of rpi_ws281x
(a few more supported boards). Would be nice to have these changes along for the ride!
I think you're probably right. This is some pretty legacy code that - to be frank - not much consideration went to at the time I grabbed it and packaged it up into a Python module
Well as long as the library can be used pretty easily, this is perfectly fine. While we're at it, do you know the minimum Python version supported for this library? It is currently not specified in the setup.py
file
(Will probably push the removal of _LED_Data
today)
IIRC this was originally written for the Pi when Python 2.7 was still very much sticking around, so that's probably the baseline. But that's hilariously old and twice deprecated. I suspect we could safely cut off at 3.6 if we want to pick a number.
Certainly wouldn't kill me to add GitHub actions to this repo, too :grimacing:
Thank you for this, I've made some tweaks, rebased my v5.0.0 branch and released a test here: https://test.pypi.org/project/rpi-ws281x/
Fixes #90.
Imo it might be better to have
_LED_Data
removed, and implement the__get/setitem__
methods inPixelStrip
directly, as currently the private_channel
attribute is duplicated and made public in_LED_Data
.