KPADCalibrateDPD

C Specification

#include <revolution/kpadOld.h>
s32 KPADCalibrateDPD( s32 chan ) ;

Arguments

chan one of the WPAD_CHANn values.

Return Values

Returns the number of objects captured by the DPD at the time this function is called. If the return value does not equal two, calibration was not performed.
If the return value is negative, the Wii Remote is not in a horizontal position or is being moved too much.

Description

This function sets the horizontal state of each Wii Remote.
If this function 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 are calculated by treating this state as horizontal. This state doesn't affect the calculations of the acc member.
Using this function to reset can only occur when the Wii Remote is held horizontally and only two sensors on the Sensor Bar have been detected. There is no need to call this function unless the Sensor Bar placed on the TV set is extremely unlevel or the accelerometer values are off by a great deal.

See Also

Revision History

2006/03/01 Initial version.
2006/06/19 Changed tentative product name to official name.
2006/10/25 Changed the name from Revolution SDK 2.3 to KPADOld library.


CONFIDENTIAL