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
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);
}
}
}