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:
parent
4e6f76cc1d
commit
0f9bd05180
@ -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);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -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" : {
|
||||||
|
Loading…
Reference in New Issue
Block a user