update config

This commit is contained in:
jane 2021-05-26 18:20:56 -04:00
parent 7ce0472415
commit f576532233
2 changed files with 16 additions and 2 deletions

View File

@ -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"
}

View File

@ -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);