adafruit / Adafruit_DotStar

GNU General Public License v3.0
97 stars 58 forks source link

Implements "High Bit Depth Gamma Correction Algorithm for APA102/Dotstar LEDs" for the Adafruit Dotstar library. #57

Open zackees opened 11 months ago

zackees commented 11 months ago

Thank you for creating a pull request to contribute to Adafruit's GitHub code! Before you open the request please review the following guidelines and tips to help it be more easily integrated:

This is a code-style review. Right now the compilation tests pass. However, the way I've implemented this into the main object may not be exactly what the Adafruit team has in mind. So this PR at this time is to do a check-in and see if the way I've implemented is ok, or whether I should change it. If the style is ok, then I'll do final testing with a physical unit. Note that I've already done physical device testing with this change for the FastLED library PR and so i expect the testing to be straightforward and work on the first try.

This is portable c code implementation. However, I do add a gamma16 function which is 256*sizeof(uint16_t) units in prog memory.

I've added a new test .ino file. Please see onboard_hd.ino