From b0c1bcaa654fcde1142abaca60e4e17acb8c43b5 Mon Sep 17 00:00:00 2001 From: Fabian Schlenz Date: Wed, 25 Sep 2019 18:13:39 +0200 Subject: [PATCH] More logging for effect changes in cycle effect. --- src/effect_cycle.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/effect_cycle.cpp b/src/effect_cycle.cpp index 5e7ca09..3af4593 100644 --- a/src/effect_cycle.cpp +++ b/src/effect_cycle.cpp @@ -25,8 +25,13 @@ void CycleEffect::changeEffect() { LOGln("CycleEffect * Searching for new effect '%s'", cycle_effects[new_id]); delay(25); effect = select_effect( crc32String(cycle_effects[new_id]) ); - effect_id = new_id; - effectSince = millis(); + if (effect) { + effect_id = new_id; + effectSince = millis(); + LOGln("CycleEffect * Effect %s found", effect->get_name().c_str()); + } else { + LOGln("CycleEffect * Effect NOT found"); + } } boolean CycleEffect::can_be_shown_with_clock() {