zackphillips / TLC5955

Arduino library for the TI TLC5955 LED controller
MIT License
21 stars 11 forks source link

Grayscale clock is not reverted properly on serial update #11

Closed bgouhier closed 1 year ago

bgouhier commented 1 year ago

For some probably good reason, when calling TLC5955::update(), the grayscale clock is reset, then reverted to its old value.

The revert process however is incorrect, as it is fetching the current value of gsclk which has just been set to 0. As a consequence the gsclk remains =0 after any update event.

Adding a local variable to temporarily store the previous gsclk value solves the issue.