Skip to content

Commit

Permalink
Changed the boolean value of RCWL-0516 and HC-SR501 to integer value …
Browse files Browse the repository at this point in the history
…1 or 0 when storing in InfluxDB.
  • Loading branch information
s5uishida committed Sep 28, 2019
1 parent 91f715e commit 6ed77e3
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
34 changes: 17 additions & 17 deletions META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: rainy - a tiny tool for iot data collection and monitoring
Bundle-SymbolicName: rainy
Bundle-Version: 0.1.15
Bundle-Version: 0.1.16
Automatic-Module-Name: rainy
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-Vendor: Shigeru Ishida (s5uishida)
Expand All @@ -28,19 +28,19 @@ Import-Package: com.fasterxml.jackson.core;version="[2.9.9,3.0.0)",
org.influxdb;version="[2.15.0,3.0.0)",
org.influxdb.dto;version="[2.15.0,3.0.0)",
org.slf4j;version="[1.7.25,1.8.0)"
Export-Package: io.github.s5uishida.iot.rainy.data;version="0.1.15",
io.github.s5uishida.iot.rainy.device;version="0.1.15",
io.github.s5uishida.iot.rainy.device.cc2650;version="0.1.15",
io.github.s5uishida.iot.rainy.device.cc2650.data;version="0.1.15",
io.github.s5uishida.iot.rainy.device.hcsr501;version="0.1.15",
io.github.s5uishida.iot.rainy.device.hcsr501.data;version="0.1.15",
io.github.s5uishida.iot.rainy.device.mhz19b;version="0.1.15",
io.github.s5uishida.iot.rainy.device.mhz19b.data;version="0.1.15",
io.github.s5uishida.iot.rainy.device.ppd42ns;version="0.1.15",
io.github.s5uishida.iot.rainy.device.ppd42ns.data;version="0.1.15",
io.github.s5uishida.iot.rainy.device.rcwl0516;version="0.1.15",
io.github.s5uishida.iot.rainy.device.rcwl0516.data;version="0.1.15",
io.github.s5uishida.iot.rainy.sender;version="0.1.15",
io.github.s5uishida.iot.rainy.sender.influxdb;version="0.1.15",
io.github.s5uishida.iot.rainy.sender.mqtt;version="0.1.15",
io.github.s5uishida.iot.rainy.util;version="0.1.15"
Export-Package: io.github.s5uishida.iot.rainy.data;version="0.1.16",
io.github.s5uishida.iot.rainy.device;version="0.1.16",
io.github.s5uishida.iot.rainy.device.cc2650;version="0.1.16",
io.github.s5uishida.iot.rainy.device.cc2650.data;version="0.1.16",
io.github.s5uishida.iot.rainy.device.hcsr501;version="0.1.16",
io.github.s5uishida.iot.rainy.device.hcsr501.data;version="0.1.16",
io.github.s5uishida.iot.rainy.device.mhz19b;version="0.1.16",
io.github.s5uishida.iot.rainy.device.mhz19b.data;version="0.1.16",
io.github.s5uishida.iot.rainy.device.ppd42ns;version="0.1.16",
io.github.s5uishida.iot.rainy.device.ppd42ns.data;version="0.1.16",
io.github.s5uishida.iot.rainy.device.rcwl0516;version="0.1.16",
io.github.s5uishida.iot.rainy.device.rcwl0516.data;version="0.1.16",
io.github.s5uishida.iot.rainy.sender;version="0.1.16",
io.github.s5uishida.iot.rainy.sender.influxdb;version="0.1.16",
io.github.s5uishida.iot.rainy.sender.mqtt;version="0.1.16",
io.github.s5uishida.iot.rainy.util;version="0.1.16"
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void handle(String pinName, boolean detect, Date date) {
hcsr501Data.samplingTimeMillis = date.getTime();

hcsr501Data.detection = new Detection();
hcsr501Data.detection.value = detect;
hcsr501Data.detection.value = detect ? 1 : 0;

String logPrefix = "[" + pinName + "] ";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
*
*/
public class Detection {
public boolean value;
public int value;
public final String unit = "detection";
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void handle(String pinName, boolean detect, Date date) {
rcwl0516Data.samplingTimeMillis = date.getTime();

rcwl0516Data.detection = new Detection();
rcwl0516Data.detection.value = detect;
rcwl0516Data.detection.value = detect ? 1 : 0;

String logPrefix = "[" + pinName + "] ";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
*
*/
public class Detection {
public boolean value;
public int value;
public final String unit = "detection";
}
2 changes: 1 addition & 1 deletion src/io/github/s5uishida/iot/rainy/util/ConfigParams.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
public class ConfigParams {
public static final String NAME = "rainy - a tiny tool for iot data collection and monitoring";
public static final String VERSION = "0.1.15";
public static final String VERSION = "0.1.16";

public static final String CONFIG_DIR_PARAM = "config.dir";
public static final String CONFIG_FILE = "rainy.properties";
Expand Down

0 comments on commit 6ed77e3

Please sign in to comment.