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:
@ -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) {
|
||||
|
Reference in New Issue
Block a user