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>WBCRead</title> 10</head> 11 12<body> 13 14<h1 align="left">WBCRead</h1> 15 16<h2>Syntax</h2> 17 18<dl> 19 <dd><pre><code>#include <revolution/wbc.h></code> 20 21#define WBC_ERR_NONE 0 22#define WBC_ERR_NO_CONTROLLER -1 23#define WBC_ERR_BUSY -2 24#define WBC_ERR_WRONG_TEMP -3 25#define WBC_ERR_WRONG_PARAM -4 26</pre></dd> 27 <dd><pre>s32 WBCRead ( WPADBLStatus *status, double weight[], u32 size );</pre> 28 </dd> 29</dl> 30 31<h2>Arguments</h2> 32 33<table border="1" class="arguments"> 34 <tr> 35<th>status</th> 36<td>Specifies the <CODE>WPADBLStatus</CODE> structure passed by <CODE>WPADRead</CODE>. </td> 37 </tr> 38 39 <tr> 40<th>weight</th> 41<td>Contains weight-converted values. Specifies the array pointer.</td> 42 </tr> 43 44 <tr> 45<th>size</th> 46<td>Specifies the <CODE><STRONG><EM>weight</EM></STRONG></CODE> array size. Space must be allotted for at least four elements.</td> 47 </tr> 48</table> 49 50 51<h2>Return Values</h2> 52 53<p> 54Returns 1 if a person or thing weighing approximately 15.4 pounds or more is on top of the Wii Balance Board. Otherwise returns 0. Returns the following error codes on failure. 55</p> 56<table border="1" class="arguments"> 57 <tr> 58<th>WBC_ERR_BUSY</th> 59<td>Wii Balance Board calibration values have not yet been obtained.</td> 60 </tr> 61 <tr> 62<th>WBC_ERR_WRONG_PARAM</th> 63<td>Incorrect argument.</td> 64 </tr> 65</table> 66 67 68<h2>Description</h2> 69<p> 70This function converts the raw values obtained by <CODE>WPADRead</CODE> (<CODE><EM><STRONG>press</STRONG></EM></CODE> values) into weight values. Bear in mind that <CODE><EM><STRONG>press</STRONG></EM></CODE> values are refreshed 60 times a second. You must execute <code><a href="WBCSetupCalibration.html">WBCSetupCalibration</a></code> before using this function. 71</p> 72 73 74 75 76<h2>See Also</h2> 77<p class="reference"> 78<a href="WBCSetupCalibration.html">WBCSetupCalibration</a> 79</p> 80 81<h2>Revision History</h2> 82<p> 832008/04/17 Added error codes.<br>2007/12/10 Changed the weight used to determine if a person has stepped on from 11 pounds to approximately 15.4 pounds.<br>2007/10/02 Added explanation of <CODE>WBCSetupCalibration</CODE>.<br>2007/09/10 Revised text in line with changes to the function format.<br>2007/08/31 Initial version. 84</p> 85<hr><p>CONFIDENTIAL</p></body> 86</html> 87