From e121f0fd6e461c5a7848feaa42046128b8634fcf Mon Sep 17 00:00:00 2001 From: nek0 Date: Sat, 17 Apr 2021 00:35:48 +0200 Subject: [PATCH] increase scanline speed --- code/Pentasquare/src/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/Pentasquare/src/main.cpp b/code/Pentasquare/src/main.cpp index e443df8..1d9b711 100644 --- a/code/Pentasquare/src/main.cpp +++ b/code/Pentasquare/src/main.cpp @@ -99,7 +99,7 @@ void fullPanel() { void scanLineHorz() { 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 += (int)sqrt(NUM_LEDS)) { leds[i] = CRGB(CHSV(hue, 255, 255)); @@ -109,8 +109,8 @@ void scanLineHorz() { void scanLineVert() { fadeToBlackBy(leds, NUM_LEDS, 10); - for (int i = (posx / 10) % (int)sqrt(NUM_LEDS) * (int)sqrt(NUM_LEDS); - 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 / 5) % (int)sqrt(NUM_LEDS) * (int)sqrt(NUM_LEDS)) + (int)sqrt(NUM_LEDS); i++) { leds[i] = CRGB(CHSV(hue, 255, 255));