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

Add meg switch input to Ti Sensortag node

This commit is contained in:
Dave Conway-Jones 2015-08-27 10:56:43 +01:00
parent 4e6f76cc1d
commit 0f9bd05180
2 changed files with 4 additions and 4 deletions

View File

@ -84,9 +84,9 @@ module.exports = function(RED) {
msg.payload = {'x': +x.toFixed(2), 'y': +y.toFixed(2), 'z': +z.toFixed(2)}; msg.payload = {'x': +x.toFixed(2), 'y': +y.toFixed(2), 'z': +z.toFixed(2)};
node.send(msg); node.send(msg);
}); });
sensorTag.on('simpleKeyChange', function(left, right) { sensorTag.on('simpleKeyChange', function(left, right, mag) {
var msg = {'topic': node.topic + '/keys'}; var msg = {'topic': node.topic + '/keys'};
msg.payload = {'left': left, 'right': right}; msg.payload = {'left': left, 'right': right, 'magnet': mag};
node.send(msg); node.send(msg);
}); });

View File

@ -1,10 +1,10 @@
{ {
"name": "node-red-node-sensortag", "name": "node-red-node-sensortag",
"description": "A Node-RED node to read data from a TI SensorTag", "description": "A Node-RED node to read data from a TI SensorTag",
"version": "0.0.6", "version": "0.0.7",
"keywords" : ["node-red","sensortag"], "keywords" : ["node-red","sensortag"],
"dependencies": { "dependencies": {
"sensortag": "~1.0.1" "sensortag": "~1.1.0"
}, },
"license": "Apache-2.0", "license": "Apache-2.0",
"repository" : { "repository" : {