diff --git a/lights.js b/lights.js index 6a838eb..0d5a7c6 100644 --- a/lights.js +++ b/lights.js @@ -97,10 +97,12 @@ function tick_pattern() { // do the parsing stuff here log.debug("TICKING PATTERN") - if (pattern.length > 0) { + let parsed = pattern.parsed; + + if (parsed.length > 0) { for (let i = 0; i < cfg.leds; i++) { - for (let id in pattern) { - let command = pattern[id]; + for (let id in parsed) { + let command = parsed[id]; log.info(`pattern ${id} ${command}`); let name = command["command"]; log.info(`${name} matches: ${functions[name]}`);