somme fixes on new version. Acceleration threshold is an int.
git-svn-id: http://wiiusej.googlecode.com/svn/trunk@54 ae48ae66-6a45-0410-b38e-211266189506
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
package wiiusej.wiiuseapirequest;
|
||||
|
||||
/**
|
||||
* Represents a request to set orientation Threshold in Wiiuse API.
|
||||
* Orientation Threshold is the minimum angle (in degrees) between two events.
|
||||
* Represents a request with a float value to pass to wiiuse API.
|
||||
* @author gduche
|
||||
*
|
||||
*/
|
||||
@@ -36,6 +35,7 @@ public class FloatValueRequest extends WiiUseApiRequest {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the float value.
|
||||
* @return the float value
|
||||
*/
|
||||
public float getFloatValue() {
|
||||
@@ -43,7 +43,8 @@ public class FloatValueRequest extends WiiUseApiRequest {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param val the thresholhd to set
|
||||
* Set the float value.
|
||||
* @param val the value to set
|
||||
*/
|
||||
public void setFloatValue(float val) {
|
||||
this.floatValue = val;
|
||||
|
||||
@@ -2,67 +2,77 @@ package wiiusej.wiiuseapirequest;
|
||||
|
||||
/**
|
||||
* Represents a request we could do to the WiiUse API.
|
||||
*
|
||||
* @author gduche
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class WiiUseApiRequest {
|
||||
|
||||
public static int WIIUSE_STATUS_REQUEST=1;
|
||||
public static int WIIUSE_ACTIVATE_SMOOTHING_REQUEST=2;
|
||||
public static int WIIUSE_DEACTIVATE_SMOOTHING_REQUEST=-2;
|
||||
public static int WIIUSE_ACTIVATE_IR_TRACKING_REQUEST=3;
|
||||
public static int WIIUSE_DEACTIVATE_IR_TRACKING_REQUEST=-3;
|
||||
public static int WIIUSE_ACTIVATE_MOTION_SENSING_REQUEST=4;
|
||||
public static int WIIUSE_DEACTIVATE_MOTION_SENSING_REQUEST=-4;
|
||||
public static int WIIUSE_CLOSE_CONNECTION_REQUEST=5;
|
||||
public static int WIIUSE_ACTIVATE_CONTINUOUS_REQUEST=6;
|
||||
public static int WIIUSE_DEACTIVATE_CONTINUOUS_REQUEST=-6;
|
||||
public static int WIIUSE_ACTIVATE_RUMBLE_REQUEST=7;
|
||||
public static int WIIUSE_DEACTIVATE_RUMBLE_REQUEST=-7;
|
||||
public static int WIIUSE_LEDS_REQUEST=8;
|
||||
public static int WIIUSE_ORIENT_THRESHOLHD_REQUEST=9;
|
||||
public static int WIIUSE_ACCEL_THRESHOLHD_REQUEST=10;
|
||||
public static int WIIUSE_ALPHA_SMOOTHING_REQUEST=11;
|
||||
|
||||
private int wiimoteId=0;
|
||||
private int requestType=0;
|
||||
|
||||
public static int WIIUSE_STATUS_REQUEST = 1;
|
||||
public static int WIIUSE_ACTIVATE_SMOOTHING_REQUEST = 2;
|
||||
public static int WIIUSE_DEACTIVATE_SMOOTHING_REQUEST = -2;
|
||||
public static int WIIUSE_ACTIVATE_IR_TRACKING_REQUEST = 3;
|
||||
public static int WIIUSE_DEACTIVATE_IR_TRACKING_REQUEST = -3;
|
||||
public static int WIIUSE_ACTIVATE_MOTION_SENSING_REQUEST = 4;
|
||||
public static int WIIUSE_DEACTIVATE_MOTION_SENSING_REQUEST = -4;
|
||||
public static int WIIUSE_CLOSE_CONNECTION_REQUEST = 5;
|
||||
public static int WIIUSE_ACTIVATE_CONTINUOUS_REQUEST = 6;
|
||||
public static int WIIUSE_DEACTIVATE_CONTINUOUS_REQUEST = -6;
|
||||
public static int WIIUSE_ACTIVATE_RUMBLE_REQUEST = 7;
|
||||
public static int WIIUSE_DEACTIVATE_RUMBLE_REQUEST = -7;
|
||||
public static int WIIUSE_LEDS_REQUEST = 8;
|
||||
public static int WIIUSE_ORIENT_THRESHOLHD_REQUEST = 9;
|
||||
public static int WIIUSE_ACCEL_THRESHOLHD_REQUEST = 10;
|
||||
public static int WIIUSE_ALPHA_SMOOTHING_REQUEST = 11;
|
||||
public static int WIIUSE_RESYNC = 12;
|
||||
|
||||
private int wiimoteId = 0;
|
||||
private int requestType = 0;
|
||||
|
||||
/**
|
||||
* Constructor setting the id of the wiimote concerned.
|
||||
* @param id the id of the wiimote concerned.
|
||||
*
|
||||
* @param id
|
||||
* the id of the wiimote concerned.
|
||||
*/
|
||||
public WiiUseApiRequest(int id){
|
||||
public WiiUseApiRequest(int id) {
|
||||
wiimoteId = id;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Constructor setting the id of the wiimote concerned.
|
||||
* @param id the id of the wiimote concerned.
|
||||
*
|
||||
* @param id
|
||||
* the id of the wiimote concerned.
|
||||
*
|
||||
*/
|
||||
public WiiUseApiRequest(int id, int type){
|
||||
public WiiUseApiRequest(int id, int type) {
|
||||
wiimoteId = id;
|
||||
requestType = type;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get id of the wiimote concerned by this request.
|
||||
*
|
||||
* @return id of the wiimote concerned
|
||||
*/
|
||||
public int getId(){
|
||||
public int getId() {
|
||||
return wiimoteId;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set id of the wiimote concerned by this request.
|
||||
* @param id id fh the wiimote concernet
|
||||
*
|
||||
* @param id
|
||||
* id fh the wiimote concernet
|
||||
*/
|
||||
public void setId(int id){
|
||||
public void setId(int id) {
|
||||
wiimoteId = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the request type.
|
||||
*
|
||||
* @return the requestType
|
||||
*/
|
||||
public int getRequestType() {
|
||||
@@ -71,13 +81,12 @@ public class WiiUseApiRequest {
|
||||
|
||||
/**
|
||||
* Set the request type.
|
||||
* @param requestType the requestType to set
|
||||
*
|
||||
* @param requestType
|
||||
* the requestType to set
|
||||
*/
|
||||
public void setRequestType(int requestType) {
|
||||
this.requestType = requestType;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user