Hallo Wiimote Whiteboard fans,
I need some help to get my Wiimote going ( please any suggestions are welcome except a stick dynamite)
The IRLight parameters send from my winfake (a non-genuine Wiimote) are different from what Wiimote Whiteboard expect to deal with. I debuged the results of the variable “dots” at IRDot.java and found:
X position of the light ~ 0.75-1 .It should be 0 to 1 (percent). Y position of the light ~ 1-1.30. It should be 0 to 1 (percent).
Additionally the first IR source has not the index value i=0 in variable “dots” as expected, but populate i=1 and i=2 in the variable “dots”.
Then I changed IRDot.java
as follow:
public IRDot(int id, IRLight light) {
this(id,4* (light.getX()-.75),3*(light.getY()-1), light.getSize());
}
public static IRDot[] getIRDots(IRLight[] lights) {
IRDot[] dots = new IRDot[lights.length];
for (int i = 1; i < lights.length ; i++) {
dots[i-1] = lights[i] == null ? null : new IRDot(i , lights[i]);
}
return dots;
}
I was able to run the application, but the field of Wiimote camera is divided into 4 X 3 parts. When I move the IR source from minimum Y to maximum Y the cursor “travels” four times trough the monitor. When I move the IR source from minimum X to maximum X the cursor “travels” three times trough the monitor.
In the case someone knows a general way(for genuine and no-genuine wiimotes) to exchange data with wiiremotej.jar let me know.
Regards,
Murilo.