mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
catch possible non-property in BBB node
This commit is contained in:
parent
d7be242477
commit
9ba84c4908
@ -246,7 +246,7 @@ module.exports = function (RED) {
|
||||
bonescript.detachInterrupt(node._pin);
|
||||
process.nextTick(function () {
|
||||
setPinMode(node._pin, bonescript.INPUT, function (response, pin) {
|
||||
if (response.value === true) {
|
||||
if (response.hasOwnProperty("value") && response.value === true) {
|
||||
bonescript.digitalRead(node._pin, function (err, x) {
|
||||
// Initialise the currentState and lastActiveTime variables based on the value read
|
||||
node.currentState = Number(x.value);
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name" : "node-red-node-beaglebone",
|
||||
"version" : "0.1.1",
|
||||
"version" : "0.1.2",
|
||||
"description" : "A set of Node-RED nodes to interface to the GPIO pins of a Beaglebone Black board",
|
||||
"dependencies" : {
|
||||
"octalbonescript":"^1.1.*"
|
||||
|
Loading…
Reference in New Issue
Block a user