-
Notifications
You must be signed in to change notification settings - Fork 22
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
Please add 3-axis accelerometer support #12
Comments
Hi! Yes, I thought about it many times (and I know how to read the sensors data already). The problem is that Xbox 360 does not support any motion axis, so there's no exact correspondence to anything and the accelerometer may be mapped to anything. That would require a configuration UI to let the user choose the mapping, but that would require some major rework, as this tool was never intended to have complex configurations and remapping capabilities. Until I don't have a clear idea on how to do it in a usable way, I'll keep this feature on hold. If you have any suggestion, you are welcome to share it here! |
I think it can be merged with BetterJoy. BetterJoy maps the accelerometer to a mouse and the keys to x360. https://github.com/Davidobot/BetterJoy |
Hi, Daniele!
Do you have any working Windows code for reading accelerometer data? I've examined https://github.com/irungentoo/Xiaomi_gamepad/blob/master/accelerometer_print/hidraw.c but I can't reproduce it on Windows. Accelerometer values are always zero. |
https://docs.microsoft.com/en-us/previous-versions/windows/hardware/design/dn613925(v=vs.85) |
@zhangbo8418 Thanks, but it's slightly not what I'm looking for. This is generic code for Windows UWP application. But I'm looking for specific low-level code for extracting accelerometer data from Xiaomi Gamepad. |
Hi! I actually tried to enable accelerometer reports without success. I suspect that the feature doesn't even get turned on at all, as I continue receiving reports only when I press something on the gamepad. |
@dancol90 do you have any idea why the same packet to enable accel works on Linux but not on window? |
I think standard Windows HID driver doesn't pass that packet through, because Xiaomi Gamepad doesn't advertise it in REPORTDESCRIPTOR structure. |
So, gyro can't be started under windows? |
Unless someone writes a kernel-mode native Windows HID driver for Xiaomi Gamepad. I've put my efforts to start writing it, but I don't have experience in writing kernel-mode drivers. So, I've stopped my work on it for now. |
Thank you for your program so that we can use the Xiaomi Bluetooth controller on the PC smoothly. But in some scenarios, such as in cemu, I hope to use the 3-axis accelerometer of the millet handle to achieve more control. For example, users of the PS4 controller can use ds4windows( https://github.com/rajkosto/DS4Windows ) to simulate the xbox controller and add accelerometer support, which can be used in cemu to aim at the arrow. So I hope that you can add 3-axis accelerometer support so that all the functions of the Xiaomi Bluetooth controller are available on the PC.
Thanks again.
The text was updated successfully, but these errors were encountered: