wut v1.8.0
Wii U Toolchain
|
WBC is a library for accessing the Balance Board. More...
Typedefs | |
typedef enum WBCError | WBCError |
Enumerations | |
enum | WBCError { WBC_ERROR_NONE = 0 , WBC_ERROR_NO_CONTROLLER = -1 , WBC_ERROR_NOT_READY = -2 , WBC_ERROR_BAD_TEMPERATURE = -3 , WBC_ERROR_INVALID = -4 } |
Functions | |
uint32_t | WBCGetABSWeight (void) |
uint32_t | WBCGetBatteryLevel (uint8_t battery) |
Converts raw battery value to a level. | |
BOOL | WBCGetCalibrationStatus (void) |
Checks if the Balance Board calibration is completed. | |
double | WBCGetGCWeight (double weight) |
Returns gravity-corrected weight. | |
double | WBCGetGravCoff (void) |
Returns the gravity coefficient. | |
uint32_t | WBCGetProductArea (void) |
Always returns 0. | |
WBCError | WBCGetTCWeight (double weight, double *correctedWeight, const WPADStatusBalanceBoard *status) |
Returns temperature-corrected weight. | |
WBCError | WBCGetTGCWeight (double inputWeight, double *correctedWeight, const WPADStatusBalanceBoard *status) |
Applies temperature and gravity correction to weight value. | |
WBCError | WBCGetZEROPoint (double zeros[], uint32_t count) |
Return the current zeros for each sensor. | |
int32_t | WBCRead (WPADStatusBalanceBoard *status, double weights[], uint32_t count) |
Converts the raw pressure data into weight values. | |
WBCError | WBCSetZEROPoint (const double zeros[], uint32_t count) |
Resets the zero weight value. | |
BOOL | WBCSetupCalibration (void) |
Starts the calibration of Balance Board. | |
WBC is a library for accessing the Balance Board.
enum WBCError |
uint32_t WBCGetABSWeight | ( | void | ) |
uint32_t WBCGetBatteryLevel | ( | uint8_t | battery | ) |
Converts raw battery value to a level.
battery | The battery field from WPADStatusBalanceBoard . |
BOOL WBCGetCalibrationStatus | ( | void | ) |
Checks if the Balance Board calibration is completed.
WBCSetupCalibration()
double WBCGetGCWeight | ( | double | weight | ) |
Returns gravity-corrected weight.
Used internally by WBCGetTGCWeight()
.
double WBCGetGravCoff | ( | void | ) |
Returns the gravity coefficient.
uint32_t WBCGetProductArea | ( | void | ) |
Always returns 0.
WBCError WBCGetTCWeight | ( | double | weight, |
double * | correctedWeight, | ||
const WPADStatusBalanceBoard * | status | ||
) |
Returns temperature-corrected weight.
Used internally by WBCGetTGCWeight()
.
WBCError WBCGetTGCWeight | ( | double | inputWeight, |
double * | correctedWeight, | ||
const WPADStatusBalanceBoard * | status | ||
) |
Applies temperature and gravity correction to weight value.
inputWeight | The input weight value. |
correctedWeidht | Where to store the corrected weight. |
status | The status data used in WPADRead() and WBCRead() . |
WBCError WBCGetZEROPoint | ( | double | zeros[], |
uint32_t | count | ||
) |
Return the current zeros for each sensor.
int32_t WBCRead | ( | WPADStatusBalanceBoard * | status, |
double | weights[], | ||
uint32_t | count | ||
) |
Converts the raw pressure data into weight values.
status | The status argument filled in by WPADRead() . |
weights | Pointer to an array of 4 elements to store the weights in Kg. |
count | How many elements in weight (should be 4). |
1
: at least 7 Kg were detected.0
: measuring less than 7 Kg.WBCError
values. WBCSetupCalibration()
WBCError WBCSetZEROPoint | ( | const double | zeros[], |
uint32_t | count | ||
) |
Resets the zero weight value.
zeros | Array raw pressure values that correspond to zero weight, one for each sensor. |
count | The size of the zeros array, should be 4. |
BOOL WBCSetupCalibration | ( | void | ) |
Starts the calibration of Balance Board.
Note: this function is asynchronous.
WBCGetCalibrationStatus()