From 0f9bd05180f724fc3a572255e3025fd7fb20bb3b Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Thu, 27 Aug 2015 10:56:43 +0100 Subject: [PATCH] Add meg switch input to Ti Sensortag node --- hardware/sensorTag/79-sensorTag.js | 4 ++-- hardware/sensorTag/package.json | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hardware/sensorTag/79-sensorTag.js b/hardware/sensorTag/79-sensorTag.js index 191454e9..77c229bb 100644 --- a/hardware/sensorTag/79-sensorTag.js +++ b/hardware/sensorTag/79-sensorTag.js @@ -84,9 +84,9 @@ module.exports = function(RED) { msg.payload = {'x': +x.toFixed(2), 'y': +y.toFixed(2), 'z': +z.toFixed(2)}; node.send(msg); }); - sensorTag.on('simpleKeyChange', function(left, right) { + sensorTag.on('simpleKeyChange', function(left, right, mag) { var msg = {'topic': node.topic + '/keys'}; - msg.payload = {'left': left, 'right': right}; + msg.payload = {'left': left, 'right': right, 'magnet': mag}; node.send(msg); }); diff --git a/hardware/sensorTag/package.json b/hardware/sensorTag/package.json index d0beff8d..5f02f019 100644 --- a/hardware/sensorTag/package.json +++ b/hardware/sensorTag/package.json @@ -1,10 +1,10 @@ { "name": "node-red-node-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"], "dependencies": { - "sensortag": "~1.0.1" + "sensortag": "~1.1.0" }, "license": "Apache-2.0", "repository" : {