WPADClampAcc

Syntax

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

#define WPAD_CHAN0                    0
#define WPAD_CHAN1                    1
#define WPAD_CHAN2                    2
#define WPAD_CHAN3                    3

#define WPAD_ACC_CLAMP_CUBE           0
#define WPAD_ACC_CLAMP_SPHERE         1

void WPADClampAcc( s32 chan, void *status, u32 type );

Parameters

chan One of the WPAD_CHAN*.
status Pointer to the WPADStatus structure to be clamped. If the err member stores WPAD_ERR_NONE, the Motion Sensor input value is clamped according to the algorithm below.
type One of the WPAD_ACC_CLAMP_*.

Return Values

None.

Description

Clamps the Motion Sensor inputs of the Nunchuk and the Wii remote.

Use type to specify cube clamping or sphere clamping as the clamp algorithm to be used with the Motion Sensor. The Motion Sensor of the Wii remote has an active range of up to +/-3.4G on each axis, while the Motion Sensor of the Nunchuk unit has an active range of up to +/-2.1G on each axis. Controller data is clamped inside the active range based on the controller data obtained by this function and the amount of change in the unit used for gravitational acceleration as obtained using the WPADGetAccGravityUnit 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

WPADGetAccGravityUnit
WPADStatus

Revision History

2013/05/08 Automated cleanup pass.
2006/08/15 Initial version.


CONFIDENTIAL