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

Updates to Joystick Gremlin plugin #82

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

jc43081
Copy link

@jc43081 jc43081 commented May 18, 2024

  • Fixed hat handling of descriptions
  • Added mapping of Axis

@Rexeh
Copy link
Owner

Rexeh commented May 18, 2024

Hi @jc43081 I see this PR but don't believe we've spoken before?

I see you're trying to add axis support here for joystick gremlin, but the current implementation I don't believe will work.

Joystick gremlin XMLs do not expose the mappings to axis type. The only way to get this is via something like integrating DILL or parsing the debug.txt from the joystick gremlin installation which does log the correct direct device mappings.

@jc43081
Copy link
Author

jc43081 commented May 18, 2024

Hello, no, I don't believe we have, but I am grateful for your work on this. I am the author of Joystick Gremlin SC which is extension of the EX version.

Given my work on it, I believe the axis number can be used to map to the correct axis in the diagram. For example, if I have the following mapping, the axis=1 means AXIS_X. Given it's mapping to vJoys, it should be consistent. (2=Y, 3=Z, etc.)

<remap vjoy="1" axis="1" axis-type="absolute" axis-scaling="1.0" action_id="2020533b5a994da18b59452edf4cbc86"/>

I may have this wrong so please let me know if this is not correct.

@Rexeh
Copy link
Owner

Rexeh commented May 19, 2024

Hello, no, I don't believe we have, but I am grateful for your work on this. I am the author of Joystick Gremlin SC which is extension of the EX version.

Given my work on it, I believe the axis number can be used to map to the correct axis in the diagram. For example, if I have the following mapping, the axis=1 means AXIS_X. Given it's mapping to vJoys, it should be consistent. (2=Y, 3=Z, etc.)

<remap vjoy="1" axis="1" axis-type="absolute" axis-scaling="1.0" action_id="2020533b5a994da18b59452edf4cbc86"/>

I may have this wrong so please let me know if this is not correct.

Many thanks!

I've spoken with Whitemagic who maintains Joystick Gremlin who confirmed this is the case, I guess they "could" line up with the values but there is no assurance of this, which is why it hasn't been done so far. That said happy to revisit if there is something I've misunderstood given your understanding of the underlying code.

Originally I was going to integrate DILL (did some POCs with this) but overall didn't. Now that plugins are segregated it would be possible to keep this isolated to the Joystick Gremlin plugin. Parsing the debug text is the easiest (but probably most messy) but the issue here is right now the plugin system lacks multi-path support (i.e. allowing a particular plugin to require N number of file/directory selections).

Issue for this is here - #46

Coincidentally, the JG plugin is undergoing a rewrite to better support the recursive nature as the today version only supports/expects "remap" blocks. Sorry if this wasn't clear, definitely welcome people extending the tool but worth reaching out on discord/discussing first to ensure no clashes with ongoing branches.

@jc43081
Copy link
Author

jc43081 commented May 20, 2024

I am glad to contribute. I was fixing it for myself and figured others may benefit and didn't think of connecting on Discord since PRs seem to be the common way to provide these types of contributions.

Feel free to leverage it or not given the pending rewrite. It may serve as an interim solution given the hat descriptions are broken in the current version.

@Rexeh
Copy link
Owner

Rexeh commented May 22, 2024

I am glad to contribute. I was fixing it for myself and figured others may benefit and didn't think of connecting on Discord since PRs seem to be the common way to provide these types of contributions.

Feel free to leverage it or not given the pending rewrite. It may serve as an interim solution given the hat descriptions are broken in the current version.

Yeah cheers, main is not currently working and is just in-between releases so that rewrite is currently not finished hence the issue but will take a look. Reason for discord is because of this, not all the branches are published and roadmap/priorities may conflict with some other core work going on.

This is primarily because it's just old me maintaining this, obviously welcome others but would prefer if that was on more of a "team" basis / collaboration.

I'll keep this PR open for the time being, and revisit when I pickup the JG rewrite and it has been covered with tests.

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.

None yet

2 participants