1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3<head>
4<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
5<META http-equiv="Content-Style-Type" content="text/css">
6<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
7<title>KPADCalibrateDPD</title>
8</head>
9
10<body>
11
12
13
14<h1>KPADCalibrateDPD</h1>
15
16
17<h2>C Specification</h2>
18<dl>
19<dd><pre><code>#include &lt;revolution/kpad.h&gt;</code></pre>
20  </dd>
21<dd><pre><CODE>s32 KPADCalibrateDPD( s32 chan ) ;</CODE></pre>
22  </dd>
23</dl>
24
25<h2>Arguments</h2>
26<p>
27<TABLE border="1">
28  <TBODY>
29    <TR>
30<TD><code><b><i>chan</i></b></code></TD>
31<TD>One of <code>WPAD_CHAN<i>n</i></code> values.</TD>
32    </TR>
33  </TBODY>
34</TABLE>
35</p>
36
37<h2>Return Values</h2>
38<p>
39Returns 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.<BR>If the return value is negative, the Wii Remote Control is not in a horizontal position or is being moved too much.
40</p>
41
42<H2>Description</H2>
43<p>
44This function sets the horizontal state of each Wii controller.<BR>If this function is called when the Wii Remote Control is held horizontally and pointed at the sensor bar, the values for the <STRONG><EM><CODE>pos</CODE></EM></STRONG> and <STRONG><EM><CODE>horizon</CODE></EM></STRONG> member variables of the <a href="./KPADStatus.html"><code>KPADStatus</code></a> structure are calculated by treating this state as horizontal. This state doesn't affect the calculations of the <STRONG><EM><CODE>acc</CODE></EM></STRONG> member.<BR> Using this function to reset can only occur when the Wii Remote Control is held horizontally and only two sensors on the sensor bar have been detected. You do not need to call this function unless the sensor bar is on a very unlevel on the TV set or the accelerometer values are off by a great deal. You do not need to call this function unless the sensor bar has a very unlevel set up by the TV or
45</p>
46
47<h2>See Also</h2>
48
49<H2>Revision History</H2>
50<P>
5103/01/2006 Initial version. <BR>06/19/2006 Changed tentative product name to official name.<BR>
52</P>
53
54</body>
55</html>