Hey Tido. I see that you used a bunch of conditional #def's to get the right functionality (to the point of changing function headers). Is this done for any inherent reason or just a preferred embedded programming style? Seems like the way you split functionality to Programmable vs Standard, it's almost better to to have two programs/mains (if memory is an issue) that #include any standard functionality.
Also, have you tried or considered using the brownout detection for mode mem? I actually like the way you do memory better because it makes sense to me, but I think memory in many of the chinese lights set when you have the light off for a certain period, and I'm not really sure how they pull that off with just the brownout detection (ie discriminate between a short brownout and long one, do they use a cap to keep controller on but "browned out" or something?).
Thanks a bunch for doing this and releasing the code.