The most recent release of the LedController is version 1.4.1.
It has a lot of thing s I don’t really like, for example the current way all the methods are implemented.
If your compiler supports the std, std::array can be a return value and you don’t have to mess with pointers but a lot of boards do not support importing <array> or any std function for that matter so I copied all the functions and made plain C alternatives (which are not documented yes will be fixed in 1.4.2).
If you write code which should run on several architectures you have to check if your compiler is STD_CAPABLE or not because the plain C functions are not defined if your compiler is STD_CAPABLE (at the moment only esp32 and esp8266).
With 1.5.0 this will be fixed.
You will be able to ALWAYS use the plain C methods and the C++ alternatives in addition to that if your compiler supports them.
I will also rewrite the C++ methods to be abstractions of the C methods, to make the code a lot more readable (this should not be that difficult but you never know when it comes to programming…).
A small side note/rant. Why the F**k does ANSI C not allow for arrays as return values. This is the main reason for this whole mess. Because of that shit I basically had to rewrite all the functions that had an array as return value (at least 8 or something like that) with a function that also needs a pointer to the location where the array should be stored, making the code harder to read especially for beginners and harder to maintain because of the pointer.
It is really nice to simply have std::array as a return type and don’t have to worry if people have knowledge on pointers…
Oh and which genius had the brilliant idea to make C++ the programming language for the arduino and have a custom compiler for it but not include the std. Come on the std is where basically all of the C++ features come from and not even supporting the <mutex> or <array> type is basically saying something like:”Well it is called C++ but actually it is not rather than that it is C with classes”. Yeah some genius thought, let’s make C with classes and f**k the std it is too “complex” for most users…
(I probably could go on about this for a while longer but I will stop this for now…)