Skip to content

Commit 785d821

Browse files
author
Martin Schuhfuss
committed
simplified BCM2708-check
1 parent c885028 commit 785d821

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/ws281x-native.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@ function getNativeBindings() {
55
// in the wrong environment, so we make sure that at least everything we can
66
// test for matches the raspberry-pi before loading the native-module
77
if(process.arch === 'arm' || process.platform === 'linux') {
8-
var fs = require('fs');
98

109
// will only work on the Broadcom BCM2708
1110
var isBCM2708 = (function() {
12-
var cpuInfo = fs.readFileSync('/proc/cpuinfo').toString();
11+
var cpuInfo = require('fs').readFileSync('/proc/cpuinfo').toString();
1312

1413
return /hardware\s*:\s*bcm2708/i.test(cpuInfo);
1514
} ());

0 commit comments

Comments
 (0)