From a62f69fc92d923b38ee64592360bb56750bb0191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Ass=C3=A9nat?= Date: Sun, 20 Oct 2013 15:36:28 +0000 Subject: [PATCH] Small --- dc_pad.c | 8 ++++---- main.c | 8 -------- maplebus.c | 5 ----- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/dc_pad.c b/dc_pad.c index 26b461d..949be11 100644 --- a/dc_pad.c +++ b/dc_pad.c @@ -163,10 +163,10 @@ static void dcReadPad(void) // 13 : Joy Y axis // 14 : Joy X2 axis // 15 : Joy Y2 axis - last_built_report[0][0] = tmp[12]-1; - last_built_report[0][1] = tmp[13]-1; - last_built_report[0][2] = tmp[10]; - last_built_report[0][3] = tmp[11]; + last_built_report[0][0] = tmp[12]; + last_built_report[0][1] = tmp[13]; + last_built_report[0][2] = tmp[10] / 2 + 0x80; + last_built_report[0][3] = tmp[11] / 2 + 0x80; last_built_report[0][4] = tmp[8] ^ 0xff; last_built_report[0][5] = tmp[9] ^ 0xff; } diff --git a/main.c b/main.c index c652b67..01af616 100644 --- a/main.c +++ b/main.c @@ -243,12 +243,6 @@ int main(void) hardwareInit(); curGamepad = dcGetGamepad(); - - // A small delay is required before calling init. Otherwise, - // the shuttlemouse is not ready and the adapter runs - // in joystick mode. - _delay_ms(25); - curGamepad->init(); // configure report descriptor according to @@ -265,7 +259,6 @@ int main(void) usbInit(); set_sleep_mode(SLEEP_MODE_IDLE); sei(); - for(;;){ /* main event loop */ wdt_reset(); @@ -294,7 +287,6 @@ int main(void) if(must_report) { - for (i=0; inum_reports; i++) { int len; diff --git a/maplebus.c b/maplebus.c index 0cd1701..df3dd55 100644 --- a/maplebus.c +++ b/maplebus.c @@ -243,11 +243,6 @@ void maple_sendPacket(unsigned char *data, unsigned char len) int i; unsigned char b; - // SET PINS - // SET PINS - // SET PINS - // DLY - buf_reset(); for (i=0; i>=1)