add more logging

This commit is contained in:
jane 2021-05-26 19:56:14 -04:00
parent 5ae12454eb
commit 2a605f9488

View file

@ -54,20 +54,23 @@ function tick_pattern() {
for (let command of pattern) {
if (command.valid) {
let instruction = command.instruction;
if (functions[instruction.name.toLowerCase()]) {
let name = instruction.name.toLowerCase();
if (functions[name]) {
for (let target of instruction.args) {
let channel = target.channel;
if (!targets[channel]) {
targets[channel] = 0;
}
log.debug("targets " + channel + " " + target.arg);
log.debug("targets " + name + " " + channel + " " + target.arg);
targets[channel] =
functions[instruction.name.toLowerCase()](i, target.arg, targets[channel]);
functions[name](i, target.arg, targets[channel]);
}
}
}
}
next_pattern[i] = rgb_to_int(targets.r || 0, targets.g || 0, targets.b || 0);
log.debug(`next: ${targets["r"]}, ${targets["g"]}, ${targets["b"]}`);
next_pattern[i] = rgb_to_int(targets["r"] || 0, targets["g"] || 0, targets["b"] || 0);
}
}
else {