Hide PiLiter node from non-Pi users

This commit is contained in:
Dave C-J 2014-11-07 08:25:53 +00:00
parent 067ece146b
commit f7c7c52578
2 changed files with 4 additions and 4 deletions

View File

@ -19,9 +19,9 @@ module.exports = function(RED) {
var exec = require('child_process').exec;
var fs = require('fs');
//if (!fs.existsSync("/dev/ttyAMA0")) { // unlikely if not on a Pi
//throw "Info : Ignoring Raspberry Pi specific node.";
//}
if (!fs.existsSync("/dev/ttyAMA0")) { // unlikely if not on a Pi
throw "Info : Ignoring Raspberry Pi specific node.";
}
if (!fs.existsSync("/usr/local/bin/gpio")) { // gpio command not installed
throw "Info : Can't find Raspberry Pi wiringPi gpio command.";

View File

@ -1,6 +1,6 @@
{
"name" : "node-red-node-piliter",
"version" : "0.0.2",
"version" : "0.0.3",
"description" : "A Node-RED node to drive a Raspberry Pi Pi-LITEr 8 LED board.",
"dependencies" : {
},