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

Little extra loading error handling for BBB node

This commit is contained in:
dceejay 2015-01-29 16:41:39 +00:00
parent 0a5b184dad
commit 9170cc6282

View File

@ -41,12 +41,16 @@ module.exports = function (RED) {
bonescript.pinMode(pin, direction, callback); bonescript.pinMode(pin, direction, callback);
} }
} catch (e) { } catch (e) {
bonescript = require("bonescript"); try {
adjustName = function (pin) { bonescript = require("bonescript");
return pin; adjustName = function (pin) {
}; return pin;
setPinMode = function (pin, direction, callback) { };
bonescript.pinMode(pin, direction, undefined, undefined, undefined, callback); setPinMode = function (pin, direction, callback) {
bonescript.pinMode(pin, direction, undefined, undefined, undefined, callback);
}
} catch (e) {
throw "Info : Ignoring Beaglebone specific node.";
} }
} }
@ -549,4 +553,4 @@ module.exports = function (RED) {
clearTimeout(this.pulseTimer); clearTimeout(this.pulseTimer);
} }
}; };
}; };