mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
parent
074ca44b5f
commit
2da42c9495
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name" : "node-red-node-pi-sense-hat",
|
"name" : "node-red-node-pi-sense-hat",
|
||||||
"version" : "0.1.3",
|
"version" : "0.1.4",
|
||||||
"description" : "A Node-RED node to interact with a Raspberry Pi Sense HAT",
|
"description" : "A Node-RED node to interact with a Raspberry Pi Sense HAT",
|
||||||
"repository" : {
|
"repository" : {
|
||||||
"type":"git",
|
"type":"git",
|
||||||
|
@ -107,7 +107,13 @@ module.exports = function(RED) {
|
|||||||
// Any data on stderr means a bad thing has happened.
|
// Any data on stderr means a bad thing has happened.
|
||||||
// Best to kill it and let it reconnect.
|
// Best to kill it and let it reconnect.
|
||||||
if (RED.settings.verbose) { RED.log.error("err: "+data+" :"); }
|
if (RED.settings.verbose) { RED.log.error("err: "+data+" :"); }
|
||||||
|
if (data.indexOf("WARNING") === 0) {
|
||||||
|
if (data.indexOf("sensor not present") !== -1) { return; }
|
||||||
|
else { RED.log.warn(data); }
|
||||||
|
}
|
||||||
|
else {
|
||||||
hat.kill('SIGKILL');
|
hat.kill('SIGKILL');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
hat.stderr.on('error', function(err) { });
|
hat.stderr.on('error', function(err) { });
|
||||||
hat.stdin.on('error', function(err) { });
|
hat.stdin.on('error', function(err) { });
|
||||||
|
Loading…
Reference in New Issue
Block a user