diff --git a/src/nunchuk.c b/src/nunchuk.c index b080e9b..e5ff240 100644 --- a/src/nunchuk.c +++ b/src/nunchuk.c @@ -61,10 +61,7 @@ int nunchuk_handshake(struct wiimote_t* wm, struct nunchuk_t* nc, byte* data, un nc->accel_calib.st_alpha = wm->accel_calib.st_alpha; /* decrypt data */ -/* - for (i = 0; i < len; ++i) - data[i] = (data[i] ^ 0x17) + 0x17; -*/ + if (data[offset] == 0xFF) { /* * Sometimes the data returned here is not correct. @@ -139,11 +136,6 @@ void nunchuk_disconnected(struct nunchuk_t* nc) { void nunchuk_event(struct nunchuk_t* nc, byte* msg) { int i; - /* decrypt data */ -/* - for (i = 0; i < 6; ++i) - msg[i] = (msg[i] ^ 0x17) + 0x17; -*/ /* get button states */ nunchuk_pressed_buttons(nc, msg[5]);