KPADCalibrateDPD

Syntax

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

s32 KPADCalibrateDPD( s32 chan );

Parameters

chan One of the WPAD_CHANn values.

Return Values

Returns the number of objects captured by the DPD when this function is called. If the return value is not 2, calibration has not been performed. If the return value is negative, the Wii remote is not in a horizontal position or is being moved excessively.

Description

This function sets the horizontal state of each Wii remote. If it is called when the Wii remote is held horizontally and pointed at the Sensor Bar, the values for the pos and horizon member variables of the KPADStatus structure will be calculated by treating this state as horizontal. The state does not affect the calculations of the acc member. This function is used for reset only when the Wii remote is held horizontally and when only two sensors on the Sensor Bar are detected. The function does not have to be called, except when the Sensor Bar placed on the TV set is extremely uneven or the accelerometer values are significantly off.

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.

Revision History

2013/05/08 Automated cleanup pass.
2006/06/19 Changed the product name from tentative to official.
2006/03/01 Initial version.


CONFIDENTIAL