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

Added basic hid gamepad example #209

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

fluffymadness
Copy link

Got my changes to work for a basic Bluetooth hid gamepad. Tested under Linux/Windows10/Android.
The dummy input report sends two pressed buttons, and the analog stick is pushed in the down-right corner.

@mringwal
Copy link
Member

Thanks for the demo. Any idea on how to make it more 'fancy'?

@fluffymadness
Copy link
Author

fluffymadness commented Apr 18, 2019

Hmm, not really.
I was just thinking about it as a starting point for people trying to make a custom gamepad.
So the hardcoded values would be replaced with the input data from the buttons.
But I'd like to add xinput, switch pro controller emulation.

I did some tests with two hid descriptors that I got to work with
nkolban's bluetooth library for the esp32. They got detected and loaded in windows. (BLE HID)
https://github.com/nkolban/esp32-snippets/tree/master/cpp_utils

But right now when trying to use these longer hid descriptors with btstack I get stacktraces
when loading them.
I would open another issue on that with proper logs.

@fluffymadness
Copy link
Author

longer descriptors are working without problem, it was a issue in my code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants