Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testevdev: Add some driving sim controllers from Proton issue reports #7598

Merged
merged 2 commits into from
May 23, 2023
Merged
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
76 changes: 75 additions & 1 deletion test/testevdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ typedef struct
uint8_t ff[(FF_MAX + 1) / 8];
uint8_t props[INPUT_PROP_MAX / 8];
int expected;
const char *todo;
} GuessTest;

/*
Expand Down Expand Up @@ -941,6 +942,74 @@ static const GuessTest guess_tests[] =
/* 0x180 */ ZEROx4, 0x00, 0x00, 0x40, 0x00,
},
},
{ /* https://github.com/ValveSoftware/Proton/issues/5126 */
.name = "Smarty Co. VRS DirectForce Pro Pedals",
.bus_type = 0x0003,
.vendor_id = 0x0483, /* STMicroelectronics */
.product_id = 0xa3be, /* VRS DirectForce Pro Pedals */
.version = 0x0111,
Comment on lines +946 to +950
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be https://virtualracingschool.com/dfpro-pedals/, presumably a smaller manufacturer using a ST Microelectronics USB component and borrowing ST Microelectronics' vendor ID - hopefully with permission, but who knows.

/* TODO: Ideally we would identify this as a joystick, but there
* isn't currently enough information to do that without a table
* of known devices. */
.expected = SDL_UDEV_DEVICE_JOYSTICK,
.todo = "https://github.com/ValveSoftware/Proton/issues/5126",
/* SYN, ABS */
.ev = { 0x09 },
/* X, Y, Z */
.abs = { 0x07 },
},
{ /* https://github.com/ValveSoftware/Proton/issues/5126 */
.name = "Heusinkveld Heusinkveld Sim Pedals Ultimate",
.bus_type = 0x0003,
.vendor_id = 0x30b7, /* Heusinkveld Engineering */
.product_id = 0x1003, /* Heusinkveld Sim Pedals Ultimate */
.version = 0x0000,
/* TODO: Ideally we would identify this as a joystick, but there
* isn't currently enough information to do that without a table
* of known devices. */
.expected = SDL_UDEV_DEVICE_JOYSTICK,
.todo = "https://github.com/ValveSoftware/Proton/issues/5126",
/* SYN, ABS */
.ev = { 0x09 },
/* RX, RY, RZ */
.abs = { 0x38 },
},
{ /* https://github.com/ValveSoftware/Proton/issues/5126 */
.name = "Vitaly [mega_mozg] Naidentsev ODDOR-handbrake",
.bus_type = 0x0003,
.vendor_id = 0x0000,
.product_id = 0x0000,
.version = 0x0001,
/* TODO: Ideally we would identify this as a joystick by it having
* the joystick-specific THROTTLE axis and TRIGGER/THUMB buttons */
.expected = SDL_UDEV_DEVICE_JOYSTICK,
.todo = "https://github.com/ValveSoftware/Proton/issues/5126",
/* SYN, KEY, ABS, MSC */
.ev = { 0x1b },
/* THROTTLE only */
.abs = { 0x40 },
.keys = {
/* 0x00-0xff */ ZEROx8, ZEROx8, ZEROx8, ZEROx8,
/* TRIGGER = 0x120, THUMB = 0x121 */
/* 0x100 */ ZEROx4, 0x03, 0x00, 0x00, 0x00,
},
},
{ /* https://github.com/ValveSoftware/Proton/issues/5126 */
.name = "Leo Bodnar Logitech® G25 Pedals",
.bus_type = 0x0003,
.vendor_id = 0x1dd2, /* Leo Bodnar Electronics Ltd */
.product_id = 0x100c,
.version = 0x0110,
Comment on lines +998 to +1002
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be https://www.leobodnar.com/shop/index.php?main_page=product_info&products_id=187, a third-party serial-to-USB adapter to connect Logitech G25 pedals (only) as a separate game controller.

/* TODO: Ideally we would identify this as a joystick, but there
* isn't currently enough information to do that without a table
* of known devices. */
.expected = SDL_UDEV_DEVICE_JOYSTICK,
.todo = "https://github.com/ValveSoftware/Proton/issues/5126",
/* SYN, ABS */
.ev = { 0x09 },
/* RX, RY, RZ */
.abs = { 0x38 },
},
{
.name = "No information",
.expected = SDL_UDEV_DEVICE_UNKNOWN,
Expand Down Expand Up @@ -1029,7 +1098,12 @@ run_test(void)
}
}

success = 0;
if (t->todo) {
printf("\tKnown issue, ignoring: %s\n", t->todo);
} else {
printf("\tFailed\n");
success = 0;
}
}
}

Expand Down