Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions modules/ds34bt/iop/ds34bt.c
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,7 @@ static int l2cap_disconnection_response(u16 handle, u8 rxid, u16 scid, u16 dcid)
return L2CAP_Command(handle, cmd_buf, 8);
}

#define CMD_DELAY 2
#define CMD_DELAY 1

static int L2CAP_event_task(int result, int bytes)
{
Expand Down Expand Up @@ -1080,7 +1080,7 @@ static int L2CAP_event_task(int result, int bytes)
ds34pad[pad].oldled[3] = 0;
}
DelayThread(CMD_DELAY);
hid_LEDRumble(ds34pad[pad].oldled, 0, 0, pad);
//hid_LEDRumble(ds34pad[pad].oldled, 0, 0, pad);
pad_status_set(DS34BT_STATE_RUNNING, pad);
}
break;
Expand Down
12 changes: 6 additions & 6 deletions modules/pademu/ds34bt.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ static u8 GenuineMacAddress[][3] =
#define HCI_COMMAND_REQ 0

#define MAX_PADS 4
#define MAX_DELAY 10
#define MAX_DELAY 1

static u8 hci_buf[MAX_BUFFER_SIZE] __attribute((aligned(4))) = {0};
static u8 l2cap_buf[MAX_BUFFER_SIZE + 32] __attribute((aligned(4))) = {0};
Expand Down Expand Up @@ -502,14 +502,14 @@ static void HCI_event_task(int result)
if (hci_buf[5] == 0) {
hci_write_scan_enable(SCAN_ENABLE_NOINQ_ENPAG);
} else {
DelayThread(500);
DelayThread(50);
hci_reset();
}
} else if ((hci_buf[3] == HCI_OCF_WRITE_SCAN_ENABLE) && (hci_buf[4] == HCI_OGF_CTRL_BBAND)) {
if (hci_buf[5] == 0) {
bt_dev.status |= DS34BT_STATE_USB_CONFIGURED;
} else {
DelayThread(500);
DelayThread(50);
hci_reset();
}
}
Expand Down Expand Up @@ -892,7 +892,7 @@ static int l2cap_disconnection_response(u16 handle, u8 rxid, u16 scid, u16 dcid)
return L2CAP_Command(handle, cmd_buf, 8);
}

#define CMD_DELAY 2
#define CMD_DELAY 1

static int L2CAP_event_task(int result, int bytes)
{
Expand Down Expand Up @@ -1081,7 +1081,7 @@ static void l2cap_event_cb(int resultCode, int bytes, void *arg)
}
} else {
if (!ds34pad[ret].isfake && ds34pad[ret].type == DS3)
DelayThread(42000); // fix for some bt adapters
DelayThread(50); // fix for some bt adapters
}
}

Expand Down Expand Up @@ -1410,7 +1410,7 @@ void ds34bt_reset()
pad_status_set(DS34BT_STATE_DISCONNECT_REQUEST, pad);
SignalSema(bt_dev.hid_sema);
while (1) {
DelayThread(500);
DelayThread(50);
WaitSema(bt_dev.hid_sema);
if (!pad_status_check(DS34BT_STATE_RUNNING, pad)) {
SignalSema(bt_dev.hid_sema);
Expand Down
10 changes: 5 additions & 5 deletions modules/pademu/pademu.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,11 +425,11 @@ void pademu_cmd(int port, u8 *in, u8 *out, u8 out_size)

pad[port].mode_cfg = in[3];
case 0x42: // read data
if (in[1] == 0x42) {
if (pad[port].vibration) { // disable/enable vibration
PAD_SET_RUMBLE(in[pad[port].lrum], in[pad[port].rrum], port);
}
}
//if (in[1] == 0x42) {
// if (pad[port].vibration) { // disable/enable vibration
// PAD_SET_RUMBLE(in[pad[port].lrum], in[pad[port].rrum], port);
//}
//}

i = PAD_GET_DATA(&out[3], out_size - 3, port);

Expand Down
3 changes: 2 additions & 1 deletion src/pad.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Review OpenUsbLd README & LICENSE files for further details.
*/

//asdfgh
#include "include/opl.h"
#include "include/pad.h"
#include "include/ioman.h"
Expand All @@ -22,7 +23,7 @@
#define CLOCKS_PER_MILISEC 147456

// 200 ms per repeat
#define DEFAULT_PAD_DELAY 200
#define DEFAULT_PAD_DELAY 1

struct pad_data_t
{
Expand Down