bug fixes

Former-commit-id: 73a44e02291ae0e73acd589f5c82bd270357ac78
This commit is contained in:
Daniel Collin 2015-12-07 16:47:48 +01:00
parent 4c05900dfc
commit 9b9774e150
4 changed files with 11 additions and 10 deletions

View file

@ -25,7 +25,7 @@
<!-- ________________________ PUBLIC TARGETS ________________________ -->
<target name="run-local-sensor" depends="build">
<target name="run-local-sensor" depends="">
<java fork="true" failonerror="true" classname="se.koc.hal.plugin.localsensor.ImpulseTracker">
<classpath>
<pathelement path="${buildDir}/hal.jar"/> <!--wildcard may not be platform independent, ok?-->
@ -34,7 +34,7 @@
</java>
</target>
<target name="run-remote-sensor" depends="build">
<target name="run-remote-sensor" depends="">
<java fork="true" failonerror="true" classname="se.koc.hal.plugin.tellstick.TelstickSerialCommTest">
<classpath>
<pathelement path="${buildDir}/hal.jar"/> <!--wildcard may not be platform independent, ok?-->
@ -43,7 +43,7 @@
</java>
</target>
<target name="run-main-server" depends="build">
<target name="run-main-server" depends="">
<java fork="true" failonerror="true" classname="se.koc.hal.PowerChallenge">
<classpath>
<pathelement path="${buildDir}/hal.jar"/> <!--wildcard may not be platform independent, ok?-->
@ -64,10 +64,12 @@
<mkdir dir="${buildDir}" />
<javac srcdir="${srcDir}" destdir="${buildDir}" fork="yes">
<include name="**/*.java" />
<exclude name="se/koc/hal/tts/GoogleTTSClient.java" />
<classpath refid="classpath.build" />
</javac>
<javac srcdir="${testDir}" destdir="${buildDir}" fork="yes">
<include name="**/*.java" />
<exclude name="se/koc/hal/test/JarvisSyntersizerTest.java" />
<classpath refid="classpath.build" />
</javac>
<jar destfile="${buildDir}/hal.jar" basedir="${buildDir}" excludes="hal.jar" />
@ -87,4 +89,4 @@
</target>
</project>
</project>

View file

@ -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();
}
}

View file

@ -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() {

View file

@ -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();
}