Comment out decryption in nunchuk - needed to work with a simulated Nunchuk.
Not sure why this was needed - will test with a real nunchuk.
This commit is contained in:
@@ -61,9 +61,10 @@ int nunchuk_handshake(struct wiimote_t* wm, struct nunchuk_t* nc, byte* data, un
|
|||||||
nc->accel_calib.st_alpha = wm->accel_calib.st_alpha;
|
nc->accel_calib.st_alpha = wm->accel_calib.st_alpha;
|
||||||
|
|
||||||
/* decrypt data */
|
/* decrypt data */
|
||||||
|
/*
|
||||||
for (i = 0; i < len; ++i)
|
for (i = 0; i < len; ++i)
|
||||||
data[i] = (data[i] ^ 0x17) + 0x17;
|
data[i] = (data[i] ^ 0x17) + 0x17;
|
||||||
|
*/
|
||||||
if (data[offset] == 0xFF) {
|
if (data[offset] == 0xFF) {
|
||||||
/*
|
/*
|
||||||
* Sometimes the data returned here is not correct.
|
* Sometimes the data returned here is not correct.
|
||||||
@@ -139,9 +140,10 @@ void nunchuk_event(struct nunchuk_t* nc, byte* msg) {
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* decrypt data */
|
/* decrypt data */
|
||||||
|
/*
|
||||||
for (i = 0; i < 6; ++i)
|
for (i = 0; i < 6; ++i)
|
||||||
msg[i] = (msg[i] ^ 0x17) + 0x17;
|
msg[i] = (msg[i] ^ 0x17) + 0x17;
|
||||||
|
*/
|
||||||
/* get button states */
|
/* get button states */
|
||||||
nunchuk_pressed_buttons(nc, msg[5]);
|
nunchuk_pressed_buttons(nc, msg[5]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user