WBCSetZEROPoint

C Specification

#include <revolution/wbc.h>
s32 WBCSetZEROPoint(double press_ave[], u32 size );

Arguments

press_ave[] Specifies the press values contained in the WPADBLStatus structure passed from WPADRead. Pass the two-second average values.
size Specifies the size of press_ave. Allocate WPAD_PRESS_UNITS number of elements (4 elements).

Return Values

Returns 0 for success. Returns -1 for failure.

Description

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 of all the press values, use the temperature update command (WPADControlBLC) to update the Wii Balance Board accessory's temperature information. After the temperature is updated, confirm that it was updated correctly. On very rare occasions a value of -128 or 127 is returned for temperature. If that happens, execute the temperature update command again. On very rare occasions, the Wii Balance Board accessory press values can fluctuate wildly for a short period after a command is sent.Therefore, after issuing the temperature update command, wait a short time (roughly 200ms) before getting the press values.

You must execute WBCSetupCalibration prior to using this function.

See Also

WPADControlBLC, WBCSetupCalibration

Revision History

2007/09/28 Corrected typos.
2007/09/13 Deleted the description concerning the temperature update feature.
2007/09/10 Changed the function format.
2007/08/31 Initial version.


CONFIDENTIAL