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

Patch to make reading the controller buttons work #42

Merged
merged 2 commits into from
Mar 24, 2018

Conversation

awesomebytes
Copy link
Contributor

To workaround #27 on my Ubuntu 16.04 64bits.

I admit it's ugly but it makes it work on my system.

Also, find a minimal example that prints all the controller events on the terminal:
https://gist.github.com/awesomebytes/75daab3adb62b331f21ecf3a03b3ab46

Even if it's not mergeable, I hope it helps someone to get this to work.

@daniel5gh
Copy link
Contributor

daniel5gh commented Nov 24, 2017

Hi, I agree this might not be the most clean solution but I also think there is no other choice.

Please bear in mind this __init__.py file is generated with the translate/translate.pl script. But quoting cmbruns:

Ideally we should add a rule to translate.pl to catch this situation. But because I don't have much time to look at this now, it would be OK to manually patch init.py, with a big "TODO" comment, like I did in several other places where I manually carry forward edits into subsequent releases.

So if you add a TODO like that I would be +1 for merging, for whatever that's worth :)

Since you are on Linux, please also keep in mind there are more situations where struct packing requires some 'hacking': You can search on "Terrible Hack" in openvr's C# bindings to find where they applied the hack. (Properly fixing all that is I think part of #35).

@awesomebytes
Copy link
Contributor Author

@daniel5gh I added a commit with the big TODO as you requested. Thank you for following up.

@awesomebytes
Copy link
Contributor Author

Any chance to merge this? :) Thank you.

@cmbruns cmbruns merged commit c9fa8b0 into cmbruns:master Mar 24, 2018
cmbruns added a commit that referenced this pull request Mar 25, 2018
Incorporate untested fixes #42 & #44
@awesomebytes
Copy link
Contributor Author

@cmbruns thank you! and thank you for re-releasing :) This is powering my ROS wrapper for the HTC Vive.

@cmbruns
Copy link
Owner

cmbruns commented Mar 26, 2018

You are welcome.

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.

3 participants