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 ability to select a joystick by name #732

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

theunkn0wn1
Copy link

Tihs PR adds a new Adaptor constructor for creating a joystick by implementation-specific name.

relates to #564

@deadprogram
Copy link
Member

Hello @theunkn0wn1 thank you for the contribution.

How does the naming work if you have 2 of the same joysticks connected?

Could you please add an example of how you would use this with 2 joysticks? Ideally this would be in the godocs comments for the new constructor.

@theunkn0wn1
Copy link
Author

To my understanding, this implementation has the same inherent flaw as the constructor it replaces, this implementation will always return the first of the two same-model joysticks as the underlying SDL2 library reports them. As I don't have two of the same joystick to compare against, im not sure what other identifiers on a joystick may be more unique we could base the constructor on.

I will happily provide godoc formatted examples, though I appear to be having a hard time finding the relevant documentation. 🤦‍♂️ Can you provide me a link for working with godoc?

@gen2thomas
Copy link
Collaborator

@theunkn0wn1 because there is no answer yet by @deadprogram, I will try to give some help.

IMO there is no specific format for the first raw documentation needed. Just have a look at some other documentation of constructors in gobot. If there any developer/user is unsure about the correct use he will have a look into some test code or even an example (e.g. gobot/examples/*). Unit tests in general are very helpful.

@theunkn0wn1
Copy link
Author

thanks @gen2thomas for a reply. The lack of activity on this PR caused me to completely forget it hadn't been seen to.
I have long since moved on from golang in general, so this PR is now offered as-is.

@gen2thomas gen2thomas marked this pull request as draft November 9, 2022 17:29
@gen2thomas
Copy link
Collaborator

gen2thomas commented Nov 9, 2022

@theunkn0wn1 thanks for the reply. So I will set it to draft as a reference.

@gen2thomas gen2thomas deleted the branch hybridgroup:dev May 15, 2023 16:25
@gen2thomas gen2thomas closed this May 15, 2023
@gen2thomas
Copy link
Collaborator

accidentally closed - now reopen

@gen2thomas gen2thomas reopened this May 23, 2023
@gen2thomas gen2thomas added the maintainer wanted the implementation was started, but for some reason not finished label Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintainer wanted the implementation was started, but for some reason not finished
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants