more bugfixes
This commit is contained in:
parent
aeef862ab4
commit
b405c12293
2 changed files with 3 additions and 2 deletions
|
|
@ -56,7 +56,7 @@ public class SensorDataAggregatorDaemon implements HalDaemon {
|
|||
|
||||
public void aggregateSensor(Sensor sensor) {
|
||||
if(sensor.getDeviceConfig() == null){
|
||||
logger.fine("The sensor type is not supported - ignoring it");
|
||||
logger.fine("The sensor config is not available - ignoring it");
|
||||
return;
|
||||
}
|
||||
logger.fine("The sensor is of type: " + sensor.getDeviceConfig().getClass().getName());
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import org.junit.Before;
|
|||
import org.junit.Test;
|
||||
|
||||
import se.hal.HalContext;
|
||||
import se.hal.plugin.tellstick.device.Oregon0x1A2D;
|
||||
import se.hal.util.UTCTimeUtility;
|
||||
import zutil.db.DBConnection;
|
||||
import zutil.db.DBUpgradeHandler;
|
||||
|
|
@ -42,7 +43,7 @@ public class SensorDataAggregationDeamonTest {
|
|||
System.out.println("Adding user to database");
|
||||
db.exec("INSERT INTO user(id, external, username) VALUES(222, 0, 'test')"); //adding user
|
||||
System.out.println("Adding sensor to database");
|
||||
db.exec("INSERT INTO sensor(id, user_id, external_id, type) VALUES(111, 222, 333, 'se.hal.plugin.tellstick.protocol.Oregon0x1A2DProtocol')"); //adding sensor
|
||||
db.exec("INSERT INTO sensor(id, user_id, external_id, type) VALUES(111, 222, 333, '"+Oregon0x1A2D.class.getName()+"')"); //adding sensor
|
||||
System.out.println("Generating raw data and saving it to the database...");
|
||||
PreparedStatement stmt = db.getPreparedStatement("INSERT INTO sensor_data_raw (timestamp, sensor_id, data) VALUES(?, ?, ?)");
|
||||
try{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue