fromdos the source

This commit is contained in:
Ryan Pavlik
2010-11-12 10:24:00 -06:00
parent 2432d5c867
commit 304bf4fc64
8 changed files with 122 additions and 122 deletions

View File

@@ -59,8 +59,8 @@ void wiiuse_handshake(struct wiimote_t* wm, byte* data, uint16_t len) {
case 0:
{
/* send request to wiimote for accelerometer calibration */
byte* buf;
byte* buf;
WIIMOTE_ENABLE_STATE(wm, WIIMOTE_STATE_HANDSHAKE);
wiiuse_set_leds(wm, WIIMOTE_LED_NONE);
@@ -68,8 +68,8 @@ void wiiuse_handshake(struct wiimote_t* wm, byte* data, uint16_t len) {
wiiuse_read_data_cb(wm, wiiuse_handshake, buf, WM_MEM_OFFSET_CALIBRATION, 7);
wm->handshake_state++;
wiiuse_set_leds(wm, WIIMOTE_LED_NONE);
wiiuse_set_leds(wm, WIIMOTE_LED_NONE);
break;
}
case 1:
@@ -94,23 +94,23 @@ void wiiuse_handshake(struct wiimote_t* wm, byte* data, uint16_t len) {
accel->cal_zero.x, accel->cal_zero.y, accel->cal_zero.z,
accel->cal_g.x, accel->cal_g.y, accel->cal_g.z);
/* request the status of the wiimote to see if there is an expansion */
wiiuse_status(wm);
/* request the status of the wiimote to see if there is an expansion */
wiiuse_status(wm);
WIIMOTE_DISABLE_STATE(wm, WIIMOTE_STATE_HANDSHAKE);
WIIMOTE_ENABLE_STATE(wm, WIIMOTE_STATE_HANDSHAKE_COMPLETE);
wm->handshake_state++;
/* now enable IR if it was set before the handshake completed */
if (WIIMOTE_IS_SET(wm, WIIMOTE_STATE_IR)) {
wm->handshake_state++;
/* now enable IR if it was set before the handshake completed */
if (WIIMOTE_IS_SET(wm, WIIMOTE_STATE_IR)) {
WIIUSE_DEBUG("Handshake finished, enabling IR.");
WIIMOTE_DISABLE_STATE(wm, WIIMOTE_STATE_IR);
wiiuse_set_ir(wm, 1);
}
}
break;
}
}
default:
{
break;