-
Notifications
You must be signed in to change notification settings - Fork 52
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
Unify layouts #37
Comments
As this data is going to to be subject to change, I think it might be better to put it on a wiki page instead |
Valid point. Another layout (like a table) would be great too, but for now: https://github.com/PatHightree/SpaceNavigator/wiki/Layout-differences Could you please add your IDs and what you've tested? Let's keep it this issue here for now as we need some place to discuss going forward. What really baffles me is the other applications' implementations. They are so straightforward. I wonder how they behave with all those different devices though. |
I had no knowledge of those implementations, it looks like those are full applications, not plugins. |
At least the GLUT one uses HID input as well. I stumbled upon this implementation via this project's wiki. About the resource I just linked i wanted to add: At least the SpaceMouse Compact info there seems to be incorrect, i have the exact same one (judging by VID and PID) but I receive 2 reports not just the 1 containing both translation and rotation. |
This python implementation also uses the same layout for all supported devices: Translation XYZ, Rotation XZY (Pitch Roll Yaw)... |
Thanks for reworking the wiki page. I've added a separate section for the Universal Receiver because it might be a special beast. Please see open questions. We just need more input about the devices from different sources. @JiapengChi please chime in :) |
I made a post on the 3dconnexion forum, asking outright for the HID details of the different hardware variations |
Here's the thread https://forum.3dconnexion.com/viewtopic.php?f=19&t=40919 Got a very interesting reply, it might very well be possible to read the data layout from the device at runtime and interpret the data accordingly. A sample implementation is forthcoming. |
Wow, ok. That's interesting indeed! Just had a longer look at InputDevice.description.capabilities and it seems to contain everything we need. Why didn't we notice before?! Those classes are internal though, but we could copy the bits we need or try and use reflection to get a nicely parsed HID descriptor object. |
Ok I guess it works all without internal APIs. Here's a quick test adopted from HIDDescriptorWindow:
The usage combined with other element info about reportId, offset and size should be enough to piece a layout together at runtime I think. |
@krisrok Sorry for replying late. The SpaceMouses I am using are the following: The Enterprise one can only work with wire, and the wireless one comes with a receiver, which I am not sure is a universal receiver or not. The pull request #34 is to fix the bugs with the two devices above, I am not sure that it can work well with the previous generation products. What kind of SpaceMouse you are using? For the Y axis, could you point out that which part of the code you have questions about? Thanks! |
I will add the information later. |
@JiapengChi Thanks, it would be great if you can you add your device info to the table on this page @krisrok Great work! |
Yep, I just finished reading up on that, too! 👍 |
Here‘s outlined what should work for us: Be sure to read the whole thing though, it has some caveats. |
"Some caveats" does not do justice at all. I've tried to implement this beast but one blocker follows the next. Here's an outline of it so far: |
One of the mods at 3dconnexion forum sent me a c++ example of how HID api can be used to interpret the HID descriptor. |
Update: |
Let's try to identify layouts (omitting buttons):
I've named them using report count (1/2) and if both parts are swapped (SS) or just one (S).
Interestingly, other implemenations do not have such distinctions regarding axis order, e.g. in FreeGLUT nor in FreeCAD.
The text was updated successfully, but these errors were encountered: