1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META http-equiv="Content-Style-Type" content="text/css">
7<LINK rel="stylesheet" type="text/css" href="../CSS/revolution.css">
8<title>WPADClampAcc</title>
9</head>
10
11<body>
12
13<h1>WPADClampAcc</h1>
14
15
16<h2>C Specification</h2>
17
18<dl>
19  <dd>
20    <pre>
21      <code>
22#include &lt;revolution/wpad.h&gt;
23
24#define WPAD_CHAN0                    0
25#define WPAD_CHAN1                    1
26#define WPAD_CHAN2                    2
27#define WPAD_CHAN3                    3
28
29#define WPAD_ACC_CLAMP_CUBE           0
30#define WPAD_ACC_CLAMP_SPHERE         1
31
32void WPADClampAcc( s32 chan, void *status, u32 type );
33      </code>
34    </pre>
35  </dd>
36</dl>
37
38<h2>Arguments</h2>
39<TABLE border="1">
40  <TBODY>
41    <TR>
42<TD width="120" bgcolor="#ffffe8"><CODE><b><i>chan</i></b></CODE></TD>
43<TD>One of the <code>WPAD_CHAN*</code>.</TD>
44    </TR>
45    <TR>
46<TD width="120" bgcolor="#ffffe8"><code><b><i>status</i></b></code></TD>
47<TD>Pointer to the <a href="./WPADStatus.html"><code>WPADStatus</code></a> structure to be clamped. If the err member stores WPAD_ERR_NONE, the motion sensor input value is clamped according to the algorithm below.</TD>
48    </TR>
49    <TR>
50<TD width="120" bgcolor="#ffffe8"><CODE><b><i>type</i></b></CODE></TD>
51<TD>One of the <code>WPAD_CHAN*</code>.</TD>
52    </TR>
53  </TBODY>
54</TABLE>
55<h2>Return Values</h2>
56<p>None.</p>
57
58<H2>Description</H2>
59<p>
60Clamps the input of the motion sensor of the Wii Remote and Nunchuk.
61</p>
62<p>
63<code>type</code> can be used 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 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 <a href="./WPADGetAccGravityUnit.html"><code>WPADGetAccGravityUnit</code></a> function.
64</p>
65
66<!-- <P><IMG src="WPADClampAcc.gif" alt="WPADClampAcc.gif (11030 bytes)" width="575" height="315"></P> -->
67<h2>See Also</h2>
68<p>
69<A href="./toc.html" target="contents">WPAD Functions</A><br> <A href="./WPADGetAccGravityUnit.html"><CODE>WPADGetAccGravityUnit</CODE></A>, <A href="./WPADStatus.html"><CODE>WPADStatus</CODE></A>, <A href="./WPADFSStatus.html"><CODE>WPADFSStatus</CODE></A><br>
70</p>
71
72<H2>Revision History</H2>
73<P>
742006/08/15 Initial version.
75</p>
76
77<hr>
78<P>CONFIDENTIAL</p>
79</BODY>
80</HTML>