access array

This commit is contained in:
jane 2021-06-04 22:21:20 -04:00
parent 877a7753d1
commit 4b956fdff0

View file

@ -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]}`);