1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

Set BBB nodes to only load if bonescript present. (ie on a BBB)

This commit is contained in:
Dave C-J 2014-04-01 10:45:54 +01:00
parent e8c328a9e1
commit 3da2a29b5e

View File

@ -16,13 +16,14 @@
// Require main module
var RED = require(process.env.NODE_RED_HOME + "/red/red");
var bonescript = require("bonescript");
// Require bonescript
try {
var bonescript = require("bonescript");
} catch (err) {
require("util").log("[145-BBB-hardware] Error: cannot find module 'bonescript'");
}
//try {
// var bonescript = require("bonescript");
//} catch (err) {
// require("util").log("[145-BBB-hardware] Error: cannot find module 'bonescript'");
//}
// Node constructor for bbb-analogue-in
function AnalogueInputNode(n) {