Skip to content

Commit

Permalink
added support for bme280-driver and bh1750fvi-driver.
Browse files Browse the repository at this point in the history
  • Loading branch information
s5uishida committed Nov 11, 2019
1 parent f7b0b18 commit 9232e1e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 3 additions & 1 deletion META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: osgi activator of rainy - a tiny tool for iot data collection and monitoring
Bundle-SymbolicName: rainy-activator
Bundle-Version: 0.1.7
Bundle-Version: 0.1.8
Automatic-Module-Name: rainy-activator
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Import-Package: io.github.s5uishida.iot.rainy.device;version="[0.1.0,0.2.0)",
io.github.s5uishida.iot.rainy.device.bh1750fvi;version="[0.1.0,0.2.0)",
io.github.s5uishida.iot.rainy.device.bme280;version="[0.1.0,0.2.0)",
io.github.s5uishida.iot.rainy.device.cc2650;version="[0.1.0,0.2.0)",
io.github.s5uishida.iot.rainy.device.hcsr501;version="[0.1.0,0.2.0)",
io.github.s5uishida.iot.rainy.device.mhz19b;version="[0.1.0,0.2.0)",
Expand Down
12 changes: 12 additions & 0 deletions src/io/github/s5uishida/iot/rainy/activator/Activator.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import org.slf4j.LoggerFactory;

import io.github.s5uishida.iot.rainy.device.IDevice;
import io.github.s5uishida.iot.rainy.device.bh1750fvi.BH1750FVI;
import io.github.s5uishida.iot.rainy.device.bme280.BME280;
import io.github.s5uishida.iot.rainy.device.cc2650.CC2650;
import io.github.s5uishida.iot.rainy.device.hcsr501.HCSR501;
import io.github.s5uishida.iot.rainy.device.mhz19b.MHZ19B;
Expand Down Expand Up @@ -39,6 +41,16 @@ public void start(BundleContext context) throws Exception {
LOG.info("CC2650 installed.");
}

if (config.getBME280()) {
devices.add(new BME280(config.getClientID()));
LOG.info("BME280 installed.");
}

if (config.getBH1750FVI()) {
devices.add(new BH1750FVI(config.getClientID()));
LOG.info("BH1750FVI installed.");
}

if (config.getMHZ19B()) {
devices.add(new MHZ19B(config.getClientID()));
LOG.info("MH-Z19B installed.");
Expand Down

0 comments on commit 9232e1e

Please sign in to comment.