use fs to parse config instead
This commit is contained in:
		
							parent
							
								
									7851830f62
								
							
						
					
					
						commit
						599561466a
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -1,6 +1,7 @@ | ||||||
| import * as ws281x from 'rpi-ws281x' | import * as ws281x from 'rpi-ws281x' | ||||||
|  | import * as fs from 'fs' | ||||||
| 
 | 
 | ||||||
| const cfg = require('./config.json'); | const cfg = JSON.parse(fs.readFileSync('./config.json')); | ||||||
| 
 | 
 | ||||||
| const fade_ticks = cfg.fade_ticks || 10; | const fade_ticks = cfg.fade_ticks || 10; | ||||||
| var pixels = new Uint32Array(cfg.leds); | var pixels = new Uint32Array(cfg.leds); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue