jgarff / rpi_ws281x

Userspace Raspberry Pi PWM library for WS281X LEDs
BSD 2-Clause "Simplified" License
1.78k stars 622 forks source link

Added a function to allow a user to set a gamma correction factor. #409

Closed Romonaga closed 3 years ago

Romonaga commented 4 years ago

This will generate and apply this correction table to the led gamma setting.

Gadgetoid commented 4 years ago

Sorry I haven't yet had a chance to give this a test, but thank you, it's in my backlog!

Romonaga commented 4 years ago

Sorry I haven't yet had a chance to give this a test, but thank you, it's in my backlog!

That you would even consider adding it, is a honor. As you see, it makes no attempt to alter the memory that is created, it simply replaces the values. It has been working well in my code base and allows me to change gamma settings on the fly at will now. Again, thanks for considering it, been using this lib for years, and would be fantastic to have even this small contribution.

Gadgetoid commented 3 years ago

Merged with the knowledge that this breaks the CMakeLists.txt build which I will fix shortly.

Thank you!