🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

node-red-contrib-sensor-rotation-to-phrase

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-contrib-sensor-rotation-to-phrase - npm Package Compare versions

Comparing version

to
0.0.3

11

nodes/v1.js

@@ -26,2 +26,7 @@ /**

if (msg && msg.payload && msg.payload.d) {
// If data has come from an Android Bridge then
// the motion will be on acc_x, acc_y, accel_z
if (msg.payload.d.acc_x) {
androidSource(msg);
}
if (! msg.payload.d.accelX ||

@@ -38,2 +43,8 @@ ! msg.payload.d.accelY ||

function androidSource(msg) {
msg.payload.d.accelX = msg.payload.d.acc_x || 0;
msg.payload.d.accelY = msg.payload.d.acc_y || 0;
msg.payload.d.accelZ = msg.payload.d.acc_z || 0;
}
// Sensitivity is used to determine how much of a rotational

@@ -40,0 +51,0 @@ // reading is to be detected as a motion.

2

package.json
{
"name": "node-red-contrib-sensor-rotation-to-phrase",
"version": "0.0.2",
"version": "0.0.3",
"description": "A node to interpret sensor rotation as phrases",

@@ -5,0 +5,0 @@ "dependencies": {

@@ -20,3 +20,3 @@ # Node-RED Contrib Sensor Rotation to Phrase

````
as
as from an iOS bridge
````

@@ -27,2 +27,8 @@ msg.payload.d.accelX

````
or if from an Android bridge
````
msg.payload.d.acc_x
msg.payload.d.acc_y
msg.payload.d.acc_z
````

@@ -29,0 +35,0 @@ ### Calibration