diff --git a/hardware/unicorn/package.json b/hardware/unicorn/package.json index 25503178..eb0da694 100644 --- a/hardware/unicorn/package.json +++ b/hardware/unicorn/package.json @@ -1,6 +1,6 @@ { "name" : "node-red-node-pi-unicorn-hat", - "version" : "0.0.17", + "version" : "0.0.18", "description" : "A Node-RED node to output to a Raspberry Pi Unicorn HAT from Pimorini.", "dependencies" : { "pngjs": "2.2.*" diff --git a/hardware/unicorn/unicorn.js b/hardware/unicorn/unicorn.js index 629d2275..82980809 100644 --- a/hardware/unicorn/unicorn.js +++ b/hardware/unicorn/unicorn.js @@ -7,7 +7,7 @@ module.exports = function(RED) { var execSync = require('child_process').execSync; var hatCommand = __dirname+'/unihat'; - var allOK = true; + var allOK = true; try { var cpuinfo = fs.readFileSync("/proc/cpuinfo").toString(); @@ -19,7 +19,7 @@ module.exports = function(RED) { RED.log.warn("rpi-unicorn : "+RED._("node-red:rpi-gpio.errors.libnotfound")); allOK = false; } - else if (!(1 & parseInt ((fs.statSync(gpioCommand).mode & parseInt ("777", 8)).toString (8)[0]))) { + else if (!(1 & parseInt ((fs.statSync(hatCommand).mode & parseInt ("777", 8)).toString (8)[0]))) { RED.log.warn("rpi-unicorn : "+RED._("node-red:rpi-gpio.errors.needtobeexecutable",{command:hatCommand})); allOK = false; }