#include <cafe/pads/wbc/wbc.h> #define WBC_ERR_NONE 0 #define WBC_ERR_NO_CONTROLLER -1 #define WBC_ERR_BUSY -2 #define WBC_ERR_WRONG_TEMP -3 #define WBC_ERR_WRONG_PARAM -4 s32 WBCSetZEROPoint(double press_ave[ ], u32 size );
|press_ave[ ]||Specifies the
|size||Specifies the size of press_ave. Allocate
0 for success. Returns the following error codes on failure.
|WBC_ERR_BUSY||Wii Balance Board calibration values have not yet been obtained.|
This function sets the zero point. As arguments, pass the two-second averages of the
press values (WBC raw values) in the no-load state. The zero point must be set using this function every time before measuring a weight.
Before you begin sampling for the two-second average for each
press value, use the temperature update command (
WPADControlBLC) to update the Wii Balance Board's temperature information.
After the temperature is updated, confirm that it was updated correctly. On rare occasions a value of -128 or 127 is returned for the temperature. If that happens, execute the temperature update command again.
On rare occasions, the Wii Balance Board
press values can fluctuate wildly for a short period after a command is sent.
After issuing the temperature update command, wait a short time (roughly 200ms) before getting the
WBCSetupCalibration prior to using this function.
|Background||Do not call this function from the background.|
|Interrupt handler||Do not call this function from any interrupt handler.|
|Exception handler||Do not call this function from any exception handler.|
|Multiple Cores||Do not call this function from more than one Core.|
2013/05/08 Automated cleanup pass.
2011/07/20 Initial version.