-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Joystick needs a way to handle multiple joysticks #564
Comments
I did some tinkering on this today and managed to come up with the following joystick adaptor newAdaptor function. You pass in the joystick name like NewAdaptor("Magicsee R1"). hope that helps with resolving this ticket. func NewAdaptor(targetName string) *Adaptor { |
Greetings, is there any progress on this? I have a project that needs to be able to handle multiple joysticks, and this only appears to work when @carl-ranson 's patch is applied. |
- based on hybridgroup#564 (comment) Signed-off-by: joshua salzedo <[email protected]>
there are two implementations available for reference: |
To earn the advantages of both implementations we could do the following:
(*) If this fails, maybe the name is a number? If this can occur, try to find by name. |
Right now, the code only connects to the first joystick i.e. joystick 0:
https://github.com/hybridgroup/gobot/blob/master/platforms/joystick/joystick_adaptor.go#L30
We need the ability to specify a particular joystick to handle case that more than one joystick is connected ta the same time.
The text was updated successfully, but these errors were encountered: