From 311700e7dc2b56ee2d49a982147fe21016e9389b Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Mon, 2 May 2011 13:48:01 -0500 Subject: [PATCH] documentation for balance board --- src/wiiboard.c | 3 +++ src/wiiuse.h | 25 +++++++++++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/wiiboard.c b/src/wiiboard.c index 6085214..9db2a87 100644 --- a/src/wiiboard.c +++ b/src/wiiboard.c @@ -144,6 +144,9 @@ void wii_board_event(struct wii_board_t* wb, byte* msg) { wb->bl = do_interpolate(wb->rbl, wb->cbl); } +/** + @todo not implemented! +*/ void wiiuse_set_wii_board_calib(struct wiimote_t *wm) { } diff --git a/src/wiiuse.h b/src/wiiuse.h index 193692c..47b7bff 100644 --- a/src/wiiuse.h +++ b/src/wiiuse.h @@ -515,18 +515,35 @@ typedef struct guitar_hero_3_t { * Balance Board expansion device. */ typedef struct wii_board_t { - float tl; /* Interpolated */ + /** @name Interpolated weight per sensor (kg) + * + * These are the values you're most likely to use. + * + * See example.c for how to compute total weight and center of gravity + * from these values. + */ + /** @{ */ + float tl; float tr; float bl; - float br; /* End interp */ - uint16_t rtl; /* RAW */ + float br; + /** @} */ + + /** @name Raw sensor values */ + /** @{ */ + uint16_t rtl; uint16_t rtr; uint16_t rbl; - uint16_t rbr; /* /RAW */ + uint16_t rbr; + /** @} */ + + /** @name Sensor calibration values */ + /** @{ */ uint16_t ctl[3]; /* Calibration */ uint16_t ctr[3]; uint16_t cbl[3]; uint16_t cbr[3]; /* /Calibration */ + /** @} */ uint8_t update_calib; } wii_board_t;