diff --git a/.cproject b/.cproject
index 80c883a..7d4e8d1 100644
--- a/.cproject
+++ b/.cproject
@@ -48,6 +48,7 @@
@@ -62,7 +63,8 @@
-
+
+
@@ -120,6 +122,7 @@
@@ -134,7 +137,8 @@
-
+
+
@@ -165,4 +169,5 @@
+
diff --git a/.project b/.project
index 5d0c701..0b1461f 100644
--- a/.project
+++ b/.project
@@ -27,7 +27,7 @@
org.eclipse.cdt.make.core.buildLocation
- ${workspace_loc:/WiiuseJ/Release}
+ ${workspace_loc:/WiiuseJ/Debug}
org.eclipse.cdt.make.core.contents
diff --git a/Release/libwiiusej.dll b/Release/libwiiusej.dll
index 0d194a4..0e213fa 100644
Binary files a/Release/libwiiusej.dll and b/Release/libwiiusej.dll differ
diff --git a/src/wiiuse.h b/include/wiiuse.h
similarity index 92%
rename from src/wiiuse.h
rename to include/wiiuse.h
index b27637f..bd3c27f 100644
--- a/src/wiiuse.h
+++ b/include/wiiuse.h
@@ -128,6 +128,7 @@
#define EXP_NUNCHUK 1
#define EXP_CLASSIC 2
#define EXP_GUITAR_HERO_3 3
+#define EXP_BALANCE_BOARD 4
/* IR correction types */
typedef enum ir_position_t {
@@ -462,6 +463,34 @@ typedef struct guitar_hero_3_t {
} guitar_hero_3_t;
+/**
+ * @struct balance_board_data_t
+ * @brief Balance board l/r, t/b corner data data.
+ */
+typedef struct balance_board_data_t {
+ int tr;
+ int br;
+ int tl;
+ int bl;
+} balance_board_data_t;
+
+
+/**
+ * @struct balance_board_t
+ * @brief Balance board expansion device.
+ */
+typedef struct balance_board_t {
+ float tr; /** Top Right weight */
+ float br; /** Bottom Right weight */
+ float tl; /** Top Left weight */
+ float bl; /** Bottom Left weight */
+ struct balance_board_data_t raw; /** Raw actual values */
+ struct balance_board_data_t cal_0; /** Calibration values at 0kg */
+ struct balance_board_data_t cal_17; /** Calibration values at 17kg */
+ struct balance_board_data_t cal_34; /** Calibration values at 34kg */
+} balance_board_t;
+
+
/**
* @struct expansion_t
* @brief Generic expansion device plugged into wiimote.
@@ -473,6 +502,7 @@ typedef struct expansion_t {
struct nunchuk_t nunchuk;
struct classic_ctrl_t classic;
struct guitar_hero_3_t gh3;
+ struct balance_board_t bb;
};
} expansion_t;
@@ -503,6 +533,7 @@ typedef struct wiimote_state_t {
struct vec3b_t exp_accel;
float exp_r_shoulder;
float exp_l_shoulder;
+ struct balance_board_data_t exp_bb_raw;
/* ir_t */
int ir_ax;
@@ -533,7 +564,9 @@ typedef enum WIIUSE_EVENT_TYPE {
WIIUSE_CLASSIC_CTRL_INSERTED,
WIIUSE_CLASSIC_CTRL_REMOVED,
WIIUSE_GUITAR_HERO_3_CTRL_INSERTED,
- WIIUSE_GUITAR_HERO_3_CTRL_REMOVED
+ WIIUSE_GUITAR_HERO_3_CTRL_REMOVED,
+ WIIUSE_BALANCE_BOARD_CTRL_INSERTED,
+ WIIUSE_BALANCE_BOARD_CTRL_REMOVED
} WIIUSE_EVENT_TYPE;
/**
diff --git a/lib/wiiuse.lib b/lib/wiiuse.lib
index 29d3a0f..a23c43d 100644
Binary files a/lib/wiiuse.lib and b/lib/wiiuse.lib differ