update config
This commit is contained in:
parent
7ce0472415
commit
f576532233
2 changed files with 16 additions and 2 deletions
|
@ -1,8 +1,9 @@
|
|||
{
|
||||
"leds": 450,
|
||||
"brightness": 200,
|
||||
"brightness": 150,
|
||||
"gpio": 18,
|
||||
"type": "grb",
|
||||
"fade_ticks": 25,
|
||||
"sleep_time": 100
|
||||
"sleep_time": 100,
|
||||
"log_level": "INFO"
|
||||
}
|
13
lights.js
13
lights.js
|
@ -35,10 +35,23 @@ export function set_pattern(pat) {
|
|||
pattern = pat
|
||||
}
|
||||
|
||||
let functions = {
|
||||
rand:
|
||||
}
|
||||
|
||||
function tick_pattern() {
|
||||
// do the parsing stuff here
|
||||
log.debug("TICKING PATTERN")
|
||||
|
||||
if (pattern) {
|
||||
|
||||
}
|
||||
else {
|
||||
getRandom()
|
||||
}
|
||||
}
|
||||
|
||||
function getRandom() {
|
||||
for (let i = 0; i < cfg.leds; i++) {
|
||||
var r = Math.floor(Math.random() * 256)
|
||||
var g = Math.floor(Math.random() * 256);
|
||||
|
|
Loading…
Reference in a new issue