-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Makes Gamepad example able to be tested with Windows 10/11 #8058
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
Conversation
Initial code had no effect with Win10/11 because BUTTON_START was not recognized. This change makes it visible in the Windows Game Controller Testing TAB.
if (buttonState != previousButtonState) { | ||
if (buttonState == LOW) { // BOOT Button pressed | ||
// changes many states | ||
Gamepad.send(-100, 100, 50, 100, -100, -50, HAT_DOWN_RIGHT, BUTTON_TL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
last argument here is mask, so correct value would be (1 << BUTTON_TL)
.
If |
After testing all combinations, it seems that no button is recognized by Win11. The issue is with the Windows UI -- if the specific |
Does it all work (buttons and axis) when you have that window Active, or only some things are working? Generally that is very strange... usb report is really standard. |
All working fine. I'll submit the changes I made to the example that are able to test everything. |
It is possible to change the selected gamepad button when pressing BOOT (long/short press). The selected button is used as parameter to change R/L Stick and Trigger as well as the Hat.
Description of Change
Initial example code had no effect with Win10/11 because BUTTON_START was not recognized.
This PR makes it visible in the Windows Game Controller Testing TAB.
Tests scenarios
ESP32-S2 and ESP32-S3 (OTG mode)
Related links
#6922 (comment)
#6922 (comment)