add more logging
This commit is contained in:
parent
5ae12454eb
commit
2a605f9488
1 changed files with 7 additions and 4 deletions
11
lights.js
11
lights.js
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue