Skip to content

Commit d7f683d

Browse files
committed
Add Balance Board temperature reference data
1 parent 558bf8d commit d7f683d

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

gc/wiiuse/wiiuse.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,9 @@ typedef struct wii_board_t {
534534
short cbr[3]; /* /Calibration */
535535
float x;
536536
float y;
537+
ubyte tmp;
538+
ubyte ref_tmp;
539+
ubyte bat;
537540
} wii_board_t;
538541

539542
typedef struct motion_plus_t

wiiuse/wiiboard.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ int wii_board_handshake(struct wiimote_t* wm, struct wii_board_t* wb, ubyte* dat
8484
wb->ctl[2] = (data[offset+24]<<8)|data[offset+25];
8585
wb->cbl[2] = (data[offset+26]<<8)|data[offset+27];
8686

87+
wb->ref_tmp = data[offset+64];
88+
8789
/* handshake done */
8890
wm->event = WIIUSE_WII_BOARD_INSERTED;
8991
wm->exp.type = EXP_WII_BOARD;
@@ -114,5 +116,7 @@ void wii_board_event(struct wii_board_t* wb, ubyte* msg)
114116
wb->rtr = (msg[0]<<8)|msg[1];
115117
wb->rbr = (msg[2]<<8)|msg[3];
116118
wb->rtl = (msg[4]<<8)|msg[5];
117-
wb->rbl = (msg[6]<<8)|msg[7];
119+
wb->rbl = (msg[6]<<8)|msg[7];
120+
wb->tmp = msg[8];
121+
wb->bat = msg[10];
118122
}

0 commit comments

Comments
 (0)