We want to keep `key_hue` below 255, without clipping it there, otherwise the effect will come out glitchy. To achieve that, we simply substract 255 until we're above the cap. This results in the rainbow being laid out in a kind of wave. Previously, we didn't do this in a loop, which only worked when the device had less than 128 LEDs. For devices with more, we need to do this in a loop, until we get below the cap. Based on #664 by @mattvenn. Signed-off-by: Gergely Nagy <algernon@keyboard.io>pull/676/head
parent
e50b393d5c
commit
5b17de606f
Loading…
Reference in new issue