KPADSetReviseMode

Syntax

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

void KPADSetReviseMode( s32 chan, BOOL sw );

Parameters

chan One of the WPAD_CHANn values.
sw Specify TRUE to apply angular correction, or FALSE to not apply it.

Return Values

None.

Description

Specifies whether to apply, in advance, the angular correction to the values that are returned from the Nunchuk Motion Sensor and are obtainable with KPADEXStatus. Consider that when angular correction is enabled, it is applied after clamping the Motion Sensor measurement range.

Angular Correction

The Nunchuk Motion Sensor is aligned parallel to the plane of operation of the Nunchuk Control Stick. When the Nunchuk is held as shown in the following diagram, the Motion Sensor indicates horizontal orientation.

To make the Nunchuk similar in handling to the Wii remote, this function adjusts the Motion Sensor values such that the Nunchuk indicates horizontal alignment when held as shown in the diagram below. This is accomplished by rotating the Motion Sensor values counterclockwise (when facing to the positive X-direction) around the X-axis of the Motion Sensor's coordinate system. When this is performed, the exact angle of rotation can be obtained with the KPADGetReviseAngle function.

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

KPADReviseAcc
KPADGetReviseAngle

Revision History

2013/05/08 Automated cleanup pass.
2007/05/21 Initial version.


CONFIDENTIAL