From b794e263e87e952adbf604e438ef23d9a3409ed9 Mon Sep 17 00:00:00 2001 From: Dominic Clifton Date: Thu, 16 Jul 2015 18:06:46 +0100 Subject: [PATCH] Fix compiler errors for old led animation code. --- src/main/io/ledstrip.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/main/io/ledstrip.c b/src/main/io/ledstrip.c index f33acbf32..5dcac28ce 100644 --- a/src/main/io/ledstrip.c +++ b/src/main/io/ledstrip.c @@ -825,13 +825,14 @@ void applyLedThrustRingLayer(void) } #ifdef USE_LED_ANIMATION +static uint8_t previousRow; +static uint8_t currentRow; +static uint8_t nextRow; + void updateLedAnimationState(void) { static uint8_t frameCounter = 0; - static uint8_t previousRow; - static uint8_t currentRow; - static uint8_t nextRow; uint8_t animationFrames = ledGridHeight; previousRow = (frameCounter + animationFrames - 1) % animationFrames; @@ -855,13 +856,13 @@ static void applyLedAnimationLayer(void) ledConfig = &ledConfigs[ledIndex]; if (GET_LED_Y(ledConfig) == previousRow) { - setLedHsv(ledIndex, &white); - setLedBrightness(ledIndex, 50); + setLedHsv(ledIndex, &hsv_white); + scaleLedValue(ledIndex, 50); } else if (GET_LED_Y(ledConfig) == currentRow) { - setLedHsv(ledIndex, &white); + setLedHsv(ledIndex, &hsv_white); } else if (GET_LED_Y(ledConfig) == nextRow) { - setLedBrightness(ledIndex, 50); + scaleLedValue(ledIndex, 50); } } }