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 name="GENERATOR" content="Microsoft FrontPage 3.0">
7<meta http-equiv="Content-Style-Type" content="text/css">
8<link rel="stylesheet" type="text/css" href="../CSS/revolution.css">
9<title>WBCSetZEROPoint</title>
10</head>
11
12<body>
13
14<h1 align="left">WBCSetZEROPoint</h1>
15
16<h2>C Specification</h2>
17
18<dl>
19  <dd><pre><code>#include &lt;revolution/wbc.h&gt;</code></pre>
20  </dd>
21  <dd><pre>s32 WBCSetZEROPoint(double press_ave[], u32 size );</pre>
22  </dd>
23</dl>
24
25<h2>Arguments</h2>
26
27<table border="1" cellpadding="3" cellspacing="0.1">
28  <tr>
29    <td width="120" bgcolor="#ffffe8"><code><STRONG><EM>press_ave[]</EM></STRONG></code></td>
30    <td width="520">Specifies the <CODE><EM><STRONG>press</STRONG></EM></CODE> values contained in the <CODE>WPADBLStatus</CODE> structure passed from <CODE>WPADRead</CODE>. Pass the two-second average values. </td>
31  </tr>
32
33  <tr>
34    <td width="120" bgcolor="#ffffe8"><code><STRONG><EM>size</EM></STRONG></code></td>
35    <td width="520">Specifies the size of <CODE><STRONG><EM>press_ave</EM></STRONG></CODE>. Allocate <CODE>WPAD_PRESS_UNITS</CODE> number of elements (4 elements).</td>
36  </tr>
37
38</table>
39
40
41
42
43
44
45
46
47<h2>Return Values</h2>
48Returns 0 for success. Returns -1 for failure.
49
50<h2>Description</h2>
51This function sets the zero point. As arguments, pass the two-second averages of the <CODE><EM><STRONG>press</STRONG></EM></CODE> values (WBC raw values) in the no-load state. The zero point must be set using this function every time before measuring a weight.<BR><br>Before you begin sampling for the two-second average of all the <CODE><EM><STRONG>press</STRONG></EM></CODE> values, use the temperature update command (<code><a href="../wpad/WPADControlBLC.html">WPADControlBLC</a></code>) to update the Wii Balance Board accessory's temperature information.
52
53
54
55After the temperature is updated, confirm that it was updated correctly.
56
57<font color="#FF0000"><u><strong>On very rare occasions a value of -128 or 127 is returned for temperature. If that happens, execute the temperature update command again.</strong></u></font>
58
59On very rare occasions, the Wii Balance Board accessory <CODE><EM><STRONG>press</STRONG></EM></CODE> values can fluctuate wildly for a short period after a command is sent.<font color="#FF0000"><u><strong>Therefore, after issuing the temperature update command, wait a short time (roughly 200ms) before getting the <CODE><EM><STRONG>press</STRONG></EM></CODE> values.</strong></u></font> <br> <br>You must execute <code><a href="WBCSetupCalibration.html">WBCSetupCalibration</a></code> prior to using this function.
60<p></p>
61
62
63
64
65<h2>See Also</h2>
66
67<code><a href="../wpad/WPADControlBLC.html">WPADControlBLC</a></code>, <code><a href="WBCSetupCalibration.html">WBCSetupCalibration</a></code>
68
69<h2>Revision History</h2>
70
71<p>
722007/09/28 Corrected typos.<br>2007/09/13 Deleted the description concerning the temperature update feature.<br>2007/09/10 Changed the function format.<br>2007/08/31 Initial version.
73</p>
74<hr><p>CONFIDENTIAL</p></body>
75</html>
76