Effect#loop now gets the time since the last run of the loop in ms. This enables

the effects to show animations that stay fluid independent of the current frame rate.
This commit is contained in:
2019-10-01 06:29:32 +02:00
parent 096d13438a
commit 382631d7d7
44 changed files with 78 additions and 67 deletions

View File

@ -41,9 +41,9 @@ boolean CycleEffect::clock_as_mask() {
return effect->clock_as_mask();
};
void CycleEffect::loop() {
void CycleEffect::loop(uint16_t ms) {
if (!effect) changeEffect(); // If this is the first run, we have to select an effect first!
effect->loop();
effect->loop(ms);
// Don't use EVERY_N_SECONDS(config_effect_cycle_time) here because that function isn't relly made
// to be used with changing values.
EVERY_N_SECONDS(1) {