Added Effect::start()
and Effect::stop()
to allow effects to reserve memory on start and free it afterwards.
This commit is contained in:
@ -22,7 +22,9 @@ void mqtt_callback(char* complete_topic, byte* pl, unsigned int length) {
|
||||
EffectEntry e = effects->get(i);
|
||||
if (strcmp(e.name, payload)==0) {
|
||||
//Serial.printf("Effect found in mqtt_callback: %p\n", (void *)&e->effect);
|
||||
current_effect->stop();
|
||||
current_effect = e.effect;
|
||||
current_effect->start();
|
||||
clear();
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user