Cleanup - added some @Overrides.
git-svn-id: svn://svn.code.sf.net/p/wiigee/code/trunk@80 c7eff9ee-dd40-0410-8832-91a4d88773cf
This commit is contained in:
@@ -29,11 +29,7 @@ import java.util.Vector;
|
|||||||
|
|
||||||
import logic.*;
|
import logic.*;
|
||||||
import event.*;
|
import event.*;
|
||||||
import filter.DirectionalEquivalenceFilter;
|
import filter.*;
|
||||||
import filter.Filter;
|
|
||||||
import filter.IdleStateFilter;
|
|
||||||
import filter.MotionDetectFilter;
|
|
||||||
import util.Log;
|
|
||||||
|
|
||||||
public class Device {
|
public class Device {
|
||||||
|
|
||||||
@@ -68,7 +64,6 @@ public class Device {
|
|||||||
*/
|
*/
|
||||||
public void addFilter(Filter filter) {
|
public void addFilter(Filter filter) {
|
||||||
this.filters.add(filter);
|
this.filters.add(filter);
|
||||||
Log.write("Filter added...");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -89,7 +84,6 @@ public class Device {
|
|||||||
*/
|
*/
|
||||||
public void addDeviceListener(DeviceListener listener) {
|
public void addDeviceListener(DeviceListener listener) {
|
||||||
this.devicelistener.add(listener);
|
this.devicelistener.add(listener);
|
||||||
Log.write("WiimoteListener added...");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -99,7 +93,6 @@ public class Device {
|
|||||||
*/
|
*/
|
||||||
public void addGestureListener(GestureListener listener) {
|
public void addGestureListener(GestureListener listener) {
|
||||||
this.processingunit.addGestureListener(listener);
|
this.processingunit.addGestureListener(listener);
|
||||||
Log.write("GestureListener added...");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getRecognitionButton() {
|
public int getRecognitionButton() {
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ public class Wiimote extends Device {
|
|||||||
* String representation of the mac-adress e.g. 00191D68B57C
|
* String representation of the mac-adress e.g. 00191D68B57C
|
||||||
*/
|
*/
|
||||||
public Wiimote(String btaddress) throws IOException {
|
public Wiimote(String btaddress) throws IOException {
|
||||||
btaddress = this.removeChar(btaddress, ':');
|
btaddress = this.removeChar(btaddress, ':');
|
||||||
this.btaddress=btaddress;
|
this.btaddress=btaddress;
|
||||||
this.vibrating=false;
|
this.vibrating=false;
|
||||||
this.connect();
|
this.connect();
|
||||||
@@ -287,6 +287,7 @@ public class Wiimote extends Device {
|
|||||||
* nothing else would happen.
|
* nothing else would happen.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void enableAccelerationSensors() throws IOException {
|
public void enableAccelerationSensors() throws IOException {
|
||||||
super.enableAccelerationSensors();
|
super.enableAccelerationSensors();
|
||||||
if(!this.calibrated) {
|
if(!this.calibrated) {
|
||||||
@@ -301,6 +302,7 @@ public class Wiimote extends Device {
|
|||||||
* Deactivates the acceleration sensors.
|
* Deactivates the acceleration sensors.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void disableAccelerationSensors() throws IOException {
|
public void disableAccelerationSensors() throws IOException {
|
||||||
super.disableAccelerationSensors();
|
super.disableAccelerationSensors();
|
||||||
this.sendRaw(new byte[] {CMD_SET_REPORT, 0x12, 0x00, 0x30});
|
this.sendRaw(new byte[] {CMD_SET_REPORT, 0x12, 0x00, 0x30});
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ public class WiimoteStreamer extends Thread {
|
|||||||
this.receiveCon = wiimote.getReceiveConnection();
|
this.receiveCon = wiimote.getReceiveConnection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
this.running = true;
|
this.running = true;
|
||||||
int xraw, yraw, zraw;
|
int xraw, yraw, zraw;
|
||||||
|
|||||||
@@ -135,7 +135,6 @@ public class HMM {
|
|||||||
double nenner=0;
|
double nenner=0;
|
||||||
|
|
||||||
for(int k=0; k<trainsequence.size(); k++) {
|
for(int k=0; k<trainsequence.size(); k++) {
|
||||||
//this.reset();
|
|
||||||
int[] sequence = trainsequence.elementAt(k);
|
int[] sequence = trainsequence.elementAt(k);
|
||||||
|
|
||||||
double[][] fwd = this.forwardProc(sequence);
|
double[][] fwd = this.forwardProc(sequence);
|
||||||
@@ -165,7 +164,6 @@ public class HMM {
|
|||||||
double nenner=0;
|
double nenner=0;
|
||||||
|
|
||||||
for(int k=0; k<trainsequence.size(); k++) {
|
for(int k=0; k<trainsequence.size(); k++) {
|
||||||
//this.reset();
|
|
||||||
int[] sequence = trainsequence.elementAt(k);
|
int[] sequence = trainsequence.elementAt(k);
|
||||||
|
|
||||||
double[][] fwd = this.forwardProc(sequence);
|
double[][] fwd = this.forwardProc(sequence);
|
||||||
|
|||||||
Reference in New Issue
Block a user