Only advance to next palette color when fade is down

This commit is contained in:
Paul C Diem 2020-04-27 22:26:32 -05:00
parent 3fef91d6ca
commit b6e62bf715
1 changed files with 11 additions and 9 deletions

View File

@ -1702,6 +1702,7 @@ void LightCycleColor(int8_t direction)
#ifdef USE_LIGHT_PALETTE #ifdef USE_LIGHT_PALETTE
if (Light.palette_count) { if (Light.palette_count) {
if (!Light.fade_running) {
if (0 == direction) { if (0 == direction) {
Light.wheel = random(Light.palette_count); Light.wheel = random(Light.palette_count);
} }
@ -1713,6 +1714,7 @@ void LightCycleColor(int8_t direction)
} }
} }
LightSetPaletteEntry(); LightSetPaletteEntry();
}
return; return;
} }
#endif // USE_LIGHT_PALETTE #endif // USE_LIGHT_PALETTE