This project has moved. For the latest updates, please go here.
3
Vote

Bug in decoding MotionPlus data

description

Hi,
 
I'm there's a bug in the decoding of the Motion Plus data which corrupts the angular rate measurements: in these lines in Wiimote.cs
 
mWiimoteState.MotionPlusState.RawValues.X = buff[offset + 0] | ((buff[offset + 3] & 0xfa) << 6);
mWiimoteState.MotionPlusState.RawValues.Y = buff[offset + 1] | ((buff[offset + 4] & 0xfa) << 6);
mWiimoteState.MotionPlusState.RawValues.Z = buff[offset + 2] | ((buff[offset + 5] & 0xfa) << 6);
 
the three instances of '0xfa' should be changed to '0xfc'. This fixes the problem empirically, and also matches the Wiibrew documentation.

comments

foupoudave wrote Mar 9, 2011 at 12:02 AM

wrote Feb 21, 2013 at 11:55 PM