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:
parent
e8c328a9e1
commit
3da2a29b5e
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user