When trying to update the LEDs, do not unconditionally call `modes[mode]->init` and `modes[mode]->update`: we may have no effects installed. This change stops the firmware from crashing with an NPE if no LED effects are enabled. Also sets mode and previousMode to zero in the constructor, so we start with a deterministic state. Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>pull/72/head
parent
15e9be25bb
commit
61e015ce4f
Loading…
Reference in new issue