Open moose4lord opened 6 months ago
Can you explain what the reasoning is behind:
I have to go back to 2017 to find a version of the Adafruit_Neopixel lib that has those variables declared as private. When Adafruit released v1.1.2 of that lib on Jun 28, 2017, they changed the designation from private to protected. No real mention of it in the release, they just kind of snuck it in there.
The three access specifiers in C++ are: public - members are accessible from outside the class. private - members cannot be accessed from outside the class. protected - members cannot be accessed from outside the class, however, they can be accessed in inherited classes.
So protected is almost the same as private, but a little less restrictive for classes that inherit from a base class. I help maintain the LED effects lib WS2812FX, which inherits from the Adafruit_Neopixel lib and makes use of the variables that are declared protected. Alternatively, to inherit from your tinyNeoPixel lib for ATtiny devices, I need the variables declared protected as well.
Hope that makes things a little clearer.
So you're saying we missed a correction in adafruits version that should be applied here too?
Yes, that's what it looks like to me.
Did you notice the pull request I created?
Hi, I'm using a NeoPixel library that inherits from the Adafruit_NeoPixel class and would like to modify the library to instead inherit from your tinyNeoPixel class. Adafruit_NeoPixel exposes some of the nitty gritty details of its inner workings by declaring some critical variables as "protected", making them available to classes that inherit from Adafruit_Neopixel.
Unfortunately, those variables are declared private in tinyNeoPixel, so are not reachable. Would you be willing to change the declaration to protected?
Thanks for sharing all your ATtiny hard work.