Compare commits

..

1 commit

Author SHA1 Message Date
edcc3ad757 error catching for cfg 2021-05-25 23:20:35 -04:00

View file

@ -1,9 +1,7 @@
import * as ws281x from 'rpi-ws281x' import * as ws281x from 'rpi-ws281x'
if (!global.cfg) { if (!global.cfg) {
const cfg = require('./config.json'); global.cfg = {}
global.cfg = cfg || {};
} }
const fade_ticks = global.cfg.fade_ticks || 10; const fade_ticks = global.cfg.fade_ticks || 10;
var pixels = new Uint32Array(global.cfg.leds); var pixels = new Uint32Array(global.cfg.leds);