updated DB

Former-commit-id: 54aafb0b05b5f3e88505351fb6f135af4d1a251f
This commit is contained in:
Ziver Koc 2015-12-03 16:09:18 +01:00
parent d016904147
commit 958f36dc7e
2 changed files with 5 additions and 1 deletions

BIN
hal.db

Binary file not shown.

View file

@ -33,7 +33,11 @@ public class TelstickSerialCommTest {
if(protocol instanceof Oregon0x1A2D){
logger.info("Power used: "+ ((Oregon0x1A2D)protocol).getTemperature() +" pulses");
try {
db.exec("INSERT INTO power_meter (timestamp, pulses) VALUES("+System.currentTimeMillis()+","+(int)((Oregon0x1A2D)protocol).getTemperature()+")");
db.exec("INSERT INTO sensor_data_raw (timestamp, sensor_id, data) VALUES("+
System.currentTimeMillis() + "," +
"0," +
(int)((Oregon0x1A2D)protocol).getTemperature()
+")");
} catch (SQLException e) {
e.printStackTrace();
}