change how lights tick

This commit is contained in:
jane 2021-05-26 18:28:52 -04:00
parent 1ae28c99c3
commit caf87bb36d
2 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,7 @@
import * as server from './server.js';
import * as lights from './lights.js';
const cfg = JSON.parse(fs.readFileSync('./config.json'));
server.recv(
(res) => {
@ -11,6 +12,6 @@ server.recv(
}
);
while (true) {
setInterval(() => {
lights.tick();
}
}, cfg.sleep_time || 500);

View File

@ -84,7 +84,7 @@ export function tick() {
else {
ws281x.render(pixels);
}
ws281x.sleep(cfg.sleep_time || 500);
//ws281x.sleep(cfg.sleep_time || 500);
}
function fade(index) {