#include <cafe/pads/kpad/kpad.h>

void KPADStartMplsCalibration( s32 chan );


chan One of the WPAD_CHANn values.

Return Values



Performs at-rest (zero point) calibration for the specified channel's Wii MotionPlus. This function starts calibration when called. Because the calibration process is updated inside the KPADRead function, be sure to call this function every frame.

The calibration process ends when the Wii MotionPlus value stabilizes. The degree of stability is evaluated in three steps. At first, the Wii MotionPlus is treated as stable even if slightly unstable. Ultimately, it is viewed as stable if the controller is at rest (has a rotational velocity of 5.4 dps or less). To find out the current degree of stability, use the return value of the KPADWorkMplsCalibration function. In addition, if the stability at that stage is too high, a hardware zero-point reset is run.

On average, the calibration process takes 550 milliseconds to complete. Setting a minimum calibration period of 550 milliseconds is recommended.

Do Not Call From

Background Do not call this function from the background.
Interrupt handler Do not call this function from any interrupt handler.
Exception handler Do not call this function from any exception handler.
Multiple Cores Do not call this function from more than one Core.

See Also


Revision History

2013/12/18 Added minimum calibration time.
2013/05/08 Automated cleanup pass.
2008/12/04 Initial version.