bug fixes
Former-commit-id: 73a44e02291ae0e73acd589f5c82bd270357ac78
This commit is contained in:
parent
4c05900dfc
commit
9b9774e150
4 changed files with 11 additions and 10 deletions
|
|
@ -43,11 +43,11 @@ public class PowerChallenge {
|
|||
daemon.initiate(daemonTimer);
|
||||
}
|
||||
|
||||
/*HttpServer http = new HttpServer(80);
|
||||
HttpServer http = new HttpServer(80);
|
||||
http.setDefaultPage(new HttpFilePage(FileUtil.find("web-resource/")));
|
||||
http.setPage("/", new PCOverviewHttpPage());
|
||||
http.setPage("/configure", new PCConfigureHttpPage());
|
||||
http.setPage("/heatmap", new PCHeatMapHttpPage());
|
||||
http.start();*/
|
||||
http.start();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,8 +21,7 @@ import zutil.net.threaded.ThreadedTCPNetworkServerThread;
|
|||
|
||||
public class DataSynchronizationDaemon extends ThreadedTCPNetworkServer implements HalDaemon{
|
||||
private static final Logger logger = LogUtil.getLogger();
|
||||
//public static final int SERVER_PORT = 6666;
|
||||
public static final int SERVER_PORT = 80;
|
||||
public static final int SERVER_PORT = 6666;
|
||||
|
||||
|
||||
public DataSynchronizationDaemon() {
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public class ImpulseTracker implements Runnable {
|
|||
|
||||
//start a daemon thread to save the impulse count every minute
|
||||
Thread thread = new Thread(this);
|
||||
thread.setDaemon(true);
|
||||
thread.setDaemon(false);
|
||||
thread.start();
|
||||
|
||||
}
|
||||
|
|
@ -102,7 +102,7 @@ public class ImpulseTracker implements Runnable {
|
|||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
db.exec("INSERT INTO sensor_data_raw (timestamp, sensor_id, data) VALUE("+timestamp_end+", "+2+", "+data+")");
|
||||
db.exec("INSERT INTO sensor_data_raw(timestamp, sensor_id, data) VALUES("+timestamp_end+", "+2+", "+data+")");
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue