Skip to content

Commit

Permalink
Force feedback not working with G29 on Windows #544
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Laurendeau committed Apr 6, 2018
1 parent d644944 commit a7f3829
Show file tree
Hide file tree
Showing 8 changed files with 76 additions and 74 deletions.
2 changes: 1 addition & 1 deletion core/haptic/common/ff_lg.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ uint8_t ff_lg_get_caps(uint16_t pid) {

switch(pid) {
case USB_PRODUCT_ID_LOGITECH_G27_WHEEL:
case USB_PRODUCT_ID_LOGITECH_G29_WHEEL:
case USB_PRODUCT_ID_LOGITECH_G29_PS4_WHEEL:
caps |= FF_LG_CAPS_LEDS;
break;
default:
Expand Down
2 changes: 1 addition & 1 deletion core/haptic/sink/haptic_sink_lg.c
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ static s_haptic_core_ids haptic_sink_lg_ids[] = {
{ .vid = USB_VENDOR_ID_LOGITECH, .pid = USB_PRODUCT_ID_LOGITECH_DFGT_WHEEL },
{ .vid = USB_VENDOR_ID_LOGITECH, .pid = USB_PRODUCT_ID_LOGITECH_G27_WHEEL },
{ .vid = USB_VENDOR_ID_LOGITECH, .pid = USB_PRODUCT_ID_LOGITECH_MOMO_WHEEL2 },
{ .vid = USB_VENDOR_ID_LOGITECH, .pid = USB_PRODUCT_ID_LOGITECH_G29_WHEEL },
{ .vid = USB_VENDOR_ID_LOGITECH, .pid = USB_PRODUCT_ID_LOGITECH_G29_PS4_WHEEL },
{ .vid = 0x0000, .pid = 0x0000 }, // end of table
};

Expand Down
4 changes: 2 additions & 2 deletions core/haptic/source/haptic_source_lg.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ struct haptic_source_state * haptic_source_lg_init(s_haptic_core_ids ids) {

state->caps = ff_lg_get_caps(ids.pid);

if (ids.pid == USB_PRODUCT_ID_LOGITECH_G29_WHEEL) {
if (ids.pid == USB_PRODUCT_ID_LOGITECH_G29_PS4_WHEEL) {
state->cmd_offset = 1;
}

Expand Down Expand Up @@ -275,7 +275,7 @@ static s_haptic_core_ids haptic_source_lg_ids[] = {
{ .vid = USB_VENDOR_ID_LOGITECH, .pid = USB_PRODUCT_ID_LOGITECH_DFGT_WHEEL },
{ .vid = USB_VENDOR_ID_LOGITECH, .pid = USB_PRODUCT_ID_LOGITECH_G27_WHEEL },
{ .vid = USB_VENDOR_ID_LOGITECH, .pid = USB_PRODUCT_ID_LOGITECH_MOMO_WHEEL2 },
{ .vid = USB_VENDOR_ID_LOGITECH, .pid = USB_PRODUCT_ID_LOGITECH_G29_WHEEL },
{ .vid = USB_VENDOR_ID_LOGITECH, .pid = USB_PRODUCT_ID_LOGITECH_G29_PS4_WHEEL },
{ .vid = 0x0000, .pid = 0x0000 }, // end of table
};

Expand Down
3 changes: 2 additions & 1 deletion core/include/haptic/common/ff_lg.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
#define USB_PRODUCT_ID_LOGITECH_MOMO_WHEEL2 0xca03
#define USB_PRODUCT_ID_LOGITECH_VIBRATION_WHEEL 0xca04 // rumble only
#define USB_PRODUCT_ID_LOGITECH_G920_WHEEL 0xc262 // hid++ protocol
#define USB_PRODUCT_ID_LOGITECH_G29_WHEEL 0xc24f
#define USB_PRODUCT_ID_LOGITECH_G29_PC_WHEEL 0xc24f // not sure about this one...
#define USB_PRODUCT_ID_LOGITECH_G29_PS4_WHEEL 0xc260 // classic protocol with 1 byte offset

#define FF_LG_OUTPUT_REPORT_SIZE 7

Expand Down
132 changes: 66 additions & 66 deletions core/test/haptic/ff_lg_test.c

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion launcher/gimx-launcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,8 @@ void launcherFrame::autoConfig()
#define USB_PRODUCT_ID_LOGITECH_MOMO_WHEEL2 0xca03
#define USB_PRODUCT_ID_LOGITECH_VIBRATION_WHEEL 0xca04 // rumble only
#define USB_PRODUCT_ID_LOGITECH_G920_WHEEL 0xc262 // does not support classic format
#define USB_PRODUCT_ID_LOGITECH_G29_WHEEL 0xc24f
#define USB_PRODUCT_ID_LOGITECH_G29_PC_WHEEL 0xc24f // not sure about this one...
#define USB_PRODUCT_ID_LOGITECH_G29_PS4_WHEEL 0xc260 // classic protocol with 1 byte offset

#define MAKE_IDS(USB_PRODUCT_ID) \
{ .vendor_id = USB_VENDOR_ID_LOGITECH, .product_id = USB_PRODUCT_ID }
Expand Down
2 changes: 1 addition & 1 deletion shared/gimxcontroller/src/g29_ps4.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ static s_controller controller =
{
.name = "G29 PS4",
.vid = 0x046d,
.pid = 0xc24f,
.pid = 0xc260,
.refresh_period = { .min_value = 1000, .default_value = 5000 },
.auth_required = 1,
.axes = axes,
Expand Down
2 changes: 1 addition & 1 deletion shared/gimxinput

0 comments on commit a7f3829

Please sign in to comment.