move log levels
This commit is contained in:
parent
11ba292d11
commit
03eb68c354
1 changed files with 5 additions and 5 deletions
10
lights.js
10
lights.js
|
@ -98,7 +98,7 @@ function tick_pattern() {
|
|||
log.debug("TICKING PATTERN")
|
||||
|
||||
let parsed = pattern.parsed;
|
||||
log.debug(`${JSON.stringify(pattern)} ${JSON.stringify(parsed)}`);
|
||||
log.info(`${JSON.stringify(pattern)} ${JSON.stringify(parsed)}`);
|
||||
|
||||
if (parsed && parsed.length > 0) {
|
||||
for (let i = 0; i < cfg.leds; i++) {
|
||||
|
@ -106,23 +106,23 @@ function tick_pattern() {
|
|||
let command = parsed[id];
|
||||
log.debug(`pattern ${id} ${command}`);
|
||||
let name = command["command"];
|
||||
log.debug(`${name} matches: ${functions[name]}`);
|
||||
log.info(`${name} matches: ${functions[name]}`);
|
||||
if (functions[name] != undefined) {
|
||||
if (functions[name].options && functions[name].options["convert_args"]) {
|
||||
let param_arg1 = parseInt(command.arg1) || targets[command.arg1];
|
||||
let param_arg2 = parseInt(command.arg2) || targets[command.arg2];
|
||||
let result = functions[name].func(i, param_arg1, param_arg2);
|
||||
log.debug(`convert ${command.arg1} ${param_arg1} ${command.arg2} ${param_arg2} ${result}`);
|
||||
log.info(`convert ${command.arg1} ${param_arg1} ${command.arg2} ${param_arg2} ${result}`);
|
||||
targets[command.arg1] = result;
|
||||
}
|
||||
else {
|
||||
let result = functions[name].func(i, command.arg1, command.arg2);
|
||||
log.debug(`no convert ${command.arg1} = ${result}`);
|
||||
log.info(`no convert ${command.arg1} = ${result}`);
|
||||
targets[command.arg1] = result;
|
||||
}
|
||||
}
|
||||
}
|
||||
log.debug(`next: ${targets["r"]}, ${targets["g"]}, ${targets["b"]}`);
|
||||
log.info(`next: ${targets["r"]}, ${targets["g"]}, ${targets["b"]}`);
|
||||
next_pattern[i] = rgb_to_int(targets["r"] || 0, targets["g"] || 0, targets["b"] || 0);
|
||||
targets["r"] = 0; targets["g"] = 0; targets["b"] = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue