increase scanline speed

This commit is contained in:
nek0 2021-04-17 00:35:48 +02:00
parent 5e80414b06
commit e121f0fd6e

View file

@ -99,7 +99,7 @@ void fullPanel() {
void scanLineHorz() { void scanLineHorz() {
fadeToBlackBy(leds, NUM_LEDS, 10); fadeToBlackBy(leds, NUM_LEDS, 10);
for (int i = (posx / 10) % (int)sqrt(NUM_LEDS); for (int i = (posx / 5) % (int)sqrt(NUM_LEDS);
i < NUM_LEDS; i < NUM_LEDS;
i += (int)sqrt(NUM_LEDS)) { i += (int)sqrt(NUM_LEDS)) {
leds[i] = CRGB(CHSV(hue, 255, 255)); leds[i] = CRGB(CHSV(hue, 255, 255));
@ -109,8 +109,8 @@ void scanLineHorz() {
void scanLineVert() { void scanLineVert() {
fadeToBlackBy(leds, NUM_LEDS, 10); fadeToBlackBy(leds, NUM_LEDS, 10);
for (int i = (posx / 10) % (int)sqrt(NUM_LEDS) * (int)sqrt(NUM_LEDS); for (int i = (posx / 5) % (int)sqrt(NUM_LEDS) * (int)sqrt(NUM_LEDS);
i < ((posx / 10) % (int)sqrt(NUM_LEDS) * (int)sqrt(NUM_LEDS)) + i < ((posx / 5) % (int)sqrt(NUM_LEDS) * (int)sqrt(NUM_LEDS)) +
(int)sqrt(NUM_LEDS); (int)sqrt(NUM_LEDS);
i++) { i++) {
leds[i] = CRGB(CHSV(hue, 255, 255)); leds[i] = CRGB(CHSV(hue, 255, 255));