thing-it-device-ti-sensortag
Advanced tools
Comparing version 0.1.1 to 0.1.2
{ | ||
"name": "thing-it-device-ti-sensortag", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "[thing-it-node] Device Plugin for TI CC2541 and CC2650 SensorTag.", | ||
@@ -5,0 +5,0 @@ "authors": "Marc Gille, Klaus Berberich", |
@@ -374,2 +374,6 @@ module.exports = { | ||
this.state.irTemperature = temperatureRead; | ||
if (!this.state.irTemperature){ | ||
this.state.irTemperature = 0; | ||
} | ||
} | ||
@@ -382,3 +386,7 @@ } | ||
if (temperatureRead){ | ||
this.state.irTemperature = temperatureRead; | ||
this.state.ambientTemperature = temperatureRead; | ||
if (!this.state.ambientTemperature){ | ||
this.state.ambientTemperature = 0; | ||
} | ||
} | ||
@@ -417,2 +425,6 @@ } | ||
this.state.acceleration.x = x.toFixed(1); | ||
if (!this.state.acceleration.x){ | ||
this.state.acceleration.x = 0; | ||
} | ||
} | ||
@@ -422,2 +434,6 @@ | ||
this.state.acceleration.y = y.toFixed(1); | ||
if (!this.state.acceleration.y){ | ||
this.state.acceleration.y = 0; | ||
} | ||
} | ||
@@ -427,2 +443,6 @@ | ||
this.state.acceleration.z = z.toFixed(1); | ||
if (!this.state.acceleration.z){ | ||
this.state.acceleration.z = 0; | ||
} | ||
} | ||
@@ -465,2 +485,6 @@ | ||
this.state.gyroscopicPropulsion.x = x.toFixed(1); | ||
if (!this.state.gyroscopicPropulsion.x){ | ||
this.state.gyroscopicPropulsion.x = 0; | ||
} | ||
} | ||
@@ -470,2 +494,6 @@ | ||
this.state.gyroscopicPropulsion.y = y.toFixed(1); | ||
if (!this.state.gyroscopicPropulsion.y){ | ||
this.state.gyroscopicPropulsion.y = 0; | ||
} | ||
} | ||
@@ -475,2 +503,6 @@ | ||
this.state.gyroscopicPropulsion.z = z.toFixed(1); | ||
if (!this.state.gyroscopicPropulsion.z){ | ||
this.state.gyroscopicPropulsion.z = 0; | ||
} | ||
} | ||
@@ -514,2 +546,6 @@ | ||
this.state.magneticFieldStrength.x = x.toFixed(1); | ||
if (!this.state.magneticFieldStrength.x){ | ||
this.state.magneticFieldStrength.x = 0; | ||
} | ||
} | ||
@@ -519,2 +555,6 @@ | ||
this.state.magneticFieldStrength.y = y.toFixed(1); | ||
if (!this.state.magneticFieldStrength.y){ | ||
this.state.magneticFieldStrength.y = 0; | ||
} | ||
} | ||
@@ -524,2 +564,6 @@ | ||
this.state.magneticFieldStrength.z = z.toFixed(1); | ||
if (!this.state.magneticFieldStrength.z){ | ||
this.state.magneticFieldStrength.z = 0; | ||
} | ||
} | ||
@@ -563,2 +607,6 @@ | ||
this.state.humidity = humidity.toFixed(1); | ||
if (!this.state.humidity){ | ||
this.state.humidity = 0; | ||
} | ||
} | ||
@@ -578,2 +626,3 @@ | ||
/* | ||
setInterval(function() { | ||
@@ -588,2 +637,3 @@ this.sensorTag.readHumidity(function (error, temperature, humidity){ | ||
}.bind(this), humidityInterval); | ||
*/ | ||
}.bind(this)); | ||
@@ -590,0 +640,0 @@ } |
681
104193
9