Fix compiler errors for old led animation code.

This commit is contained in:
Dominic Clifton 2015-07-16 18:06:46 +01:00
parent c5dbf16060
commit b794e263e8
1 changed files with 8 additions and 7 deletions

View File

@ -825,13 +825,14 @@ void applyLedThrustRingLayer(void)
} }
#ifdef USE_LED_ANIMATION #ifdef USE_LED_ANIMATION
static uint8_t previousRow;
static uint8_t currentRow;
static uint8_t nextRow;
void updateLedAnimationState(void) void updateLedAnimationState(void)
{ {
static uint8_t frameCounter = 0; static uint8_t frameCounter = 0;
static uint8_t previousRow;
static uint8_t currentRow;
static uint8_t nextRow;
uint8_t animationFrames = ledGridHeight; uint8_t animationFrames = ledGridHeight;
previousRow = (frameCounter + animationFrames - 1) % animationFrames; previousRow = (frameCounter + animationFrames - 1) % animationFrames;
@ -855,13 +856,13 @@ static void applyLedAnimationLayer(void)
ledConfig = &ledConfigs[ledIndex]; ledConfig = &ledConfigs[ledIndex];
if (GET_LED_Y(ledConfig) == previousRow) { if (GET_LED_Y(ledConfig) == previousRow) {
setLedHsv(ledIndex, &white); setLedHsv(ledIndex, &hsv_white);
setLedBrightness(ledIndex, 50); scaleLedValue(ledIndex, 50);
} else if (GET_LED_Y(ledConfig) == currentRow) { } else if (GET_LED_Y(ledConfig) == currentRow) {
setLedHsv(ledIndex, &white); setLedHsv(ledIndex, &hsv_white);
} else if (GET_LED_Y(ledConfig) == nextRow) { } else if (GET_LED_Y(ledConfig) == nextRow) {
setLedBrightness(ledIndex, 50); scaleLedValue(ledIndex, 50);
} }
} }
} }