Begonnen met implementatie wiimote. Nu even de wiiuse dll op de goede plaats zetten.
This commit is contained in:
36
java/src/pm/device/wiimote/WiimoteDevice.java
Normal file
36
java/src/pm/device/wiimote/WiimoteDevice.java
Normal file
@@ -0,0 +1,36 @@
|
||||
package pm.device.wiimote;
|
||||
|
||||
import pm.Action;
|
||||
import pm.Target;
|
||||
import pm.device.Device;
|
||||
import pm.exception.DeviceException;
|
||||
import pm.exception.MacroException;
|
||||
import pm.macro.event.Press;
|
||||
import wiiusej.Wiimote;
|
||||
|
||||
public class WiimoteDevice extends Device {
|
||||
protected static final int CONNECT_MAX = 10;
|
||||
|
||||
protected static WiimoteService wiimoteService;
|
||||
|
||||
protected Wiimote wiimote;
|
||||
|
||||
{
|
||||
WiimoteDevice.wiimoteService = new WiimoteService();
|
||||
}
|
||||
|
||||
public WiimoteDevice() throws DeviceException {
|
||||
wiimote = wiimoteService.getDevice(this);
|
||||
}
|
||||
|
||||
public void start() {
|
||||
super.start();
|
||||
try {
|
||||
add(
|
||||
new Press(WiimoteButton.A),
|
||||
Action.TEST.setTarget(Target.APPLICATION));
|
||||
} catch (MacroException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user