muchimi / JoystickGremlinEx

Modified version of Joystick Gremlin to add features I wanted to have but were difficult to do as just a plugin, plus I wanted to run this as 64 bit and on a more current version of Python/QT.
GNU General Public License v3.0
35 stars 6 forks source link

Modifier #154

Closed Raz0rLegend closed 2 weeks ago

Raz0rLegend commented 2 weeks ago

Hi Muchimi,

image

When i use a modifier profile mode. To add a new page of rebinds. This is like a temporary switch, BUT it works as toggle. To resolve this issue, i put this :

image

and this :

image

The issue is, it works perfectly as temporary mode switch, but it comes everytime on the SCM Mode, and i just want to have it on the previous mode.

I explain, if i am on the SCM, i press modifier, press my button and then i come back on SCM. If i'm on the nav, i press modifiier, press my button, and then i come back on nav (The issue apears here, i come back always on SCM, because of the tree i guess) if i'm on the aux, i press modifier, press my button, and then i come back on aux ( you understood it, in reality, i come back again on SCM)

Thanks in advance.

Here a gif of the issue. opera_gSOuZ11D88

The second issue is, when i delete the tree setup, when i use the modifier, it stuck itself on the AUX mode..

joystick_gremlin_0vJPOnu9YM

muchimi commented 2 weeks ago

The temporary mode action is only temporary and will return to the saved mode at the time it was activated when released, and it can get weird in certain conditions. Can you zip up your XML and attach it here (or paste it as text) or PM me on discord with the info so I can determine if this is a bug or a feature - I need to look at the exact profile "wiring" and for that I need to load your profile to make sure the behavior is as expected.

In general, a temporary mode switch is unlikely to be what you want as you probably need (and this is a hunch from my experience) a permanent mode switch based on button state (the state is temporary, the action is permanent - hard to explain!) There are several ways to do this and my go-to in this case would be to use something like this depending on the state of the input button. In SC I have one of the hat switches and a fixed button on my throttle wired as a three-way switch for this and it's how I cycle scan/mining/scm etc.

image

muchimi commented 2 weeks ago

The other recommendation I have is your mode buttons are all "Switch Mode" type actions and only appear in the root mode of your profile, and they are not mapped in any submode. Depending on the button / inputs you use, the "switch mode" can be mapped as normal to a press/release cycle, for three-way switches you need at least a release somewhere. I'm actually thinking, because this comes up very often, to have a container that does a switch mapping that handles that logic as every controller handles the input differently and it'd be a lot simpler if we had a container that has a compound button definition, and GremlinEx can do this relatively easily now with the internal API changes.

Raz0rLegend commented 2 weeks ago

Here you have my full profile

[3.24.2][NXT] Profile 25-10.zip

Just so you know, i modify the modes with the red buttons..

image

EDIT :

The one i linked you at the top is working perfectly on 13.3JG Basic Remap and all axes setup.

Preparing you the one on 5.2 with the news vjoyremap, but i'm certain it will not work as intended.

Raz0rLegend commented 2 weeks ago

Look what i have on the 13.3 original JG

joystick_gremlin_151PxsWQhK

And now it works perfecly with this version.

muchimi commented 2 weeks ago

Thanks for the info. So looking at this, you are using the older tempo container and cycle modes. I was able to import your profile (which reminds me I need to do another pass on the import feature for mode mapping specifically). I already found one issue is the tempo container reports it is invalid in GremlinEx so it doesn't run at all (so it's not even getting to the mode changes). More in soon (tm).

muchimi commented 2 weeks ago

Proposed enhancements in the link below.

https://github.com/muchimi/JoystickGremlinEx/releases/download/13.40.16ex_m/joystick_gremlin_13_40_16_m1.zip

Raz0rLegend commented 2 weeks ago

Tried, but the VjoyrRemap brings an error.

image

Is she from my side ?

EDIT : It happens even when i'm doing a new profile.

Raz0rLegend commented 2 weeks ago

So i had an issue, but it was my side, Vjoy issue.

Actualy with the tempoex, it does the same, so no come back on the good profile. Always, on the first one. I show it to you tto verify..

image image

Raz0rLegend commented 2 weeks ago

joystick_gremlin_UXAbUD50Mw

Here the video with the logs.. The cycle mode works perfect. The modifier brings some errors.

I put again the "switch to previous mode", it's good for the "toggle modifier". But it still do the same as the previous versioni, it comes back on the SCM... Here the video.

NVIDIA_Share_FnKPr1TPuB

muchimi commented 2 weeks ago

I didn't encounter a GUID error when I tested on my system using your container setup but it could be something else. The error you see is not because of a container/action issue but because the output ID of the vjoy device doesn't exist (it used to blow up, now it gives you an error "I can't find the output device you are looking for". The question is why it cannot be found - this could be because the profile needs to be remapped / updated or possibly a mapping issue. One idea is as the profile starts and I can make sure the output device still exists.

Perhaps you can describe in words what you are expecting the behavior to be - starting with "I press this and I want that to happen" then "I press this again and I want this other thing to happen".

That will let me duplicate that logic. I loaded your profile and based on the options in the XML - it does exactly what I'd expect it to do so I'm clearly missing something here lol and off in the pastures.

Raz0rLegend commented 2 weeks ago

Actualy, it happens when i push to button to change the mode, between SCM / NAV / AUX

When i psuh the modifier, i would like to add a new serial of buttons, but when i unpress the modifier, i would like to stay on the mode i was. Like this SCM > modifier > SCM SCM > NAV > modifier > NAV ....

muchimi commented 2 weeks ago

Ok so to make sure I understand this correctly, you want to press a button that temporarily changes the mode to "modifier" and when that button is released - returns to the mode it was at before the temporary switch?

Startup mode = SCM -> press button 3 -> go temporarily to modifier mode -> release button 3 -> return to SCM mode. Press button (3?) -> change from SCM to NAV mode -> press button 3 -> go temporarily to modifier mode -> release button 3 -> go back to NAV mode

Is that right?

Raz0rLegend commented 2 weeks ago

SCM > press 3 Cycle mode > NAV > press 5 temporary switch to modifier > modifier > unpress 5 back to the previous > NAV

We can talk about it on discord, streaming the issue

PS, i strated again from a clean profile. No guid error. It was because of the profile. So now, its clean. image

muchimi commented 2 weeks ago

Ok got it - I need to look this up later as I need to step away for a bit - in the mean time - wanted to verify that you have button 5 using the temporary mode switch action, and not the cycle mode action? The Cycle Mode action you use is meant to change modes through a list everytime you press the button - all your actions have a single mode in there so you probably really want the "change mode" action rather than "cycle mode", and for the temporary one, the "temporary mode" action.

I'll look into this when I get back.

Raz0rLegend commented 2 weeks ago

image image

It's that yes.

muchimi commented 2 weeks ago

After tracing through this specific use-case, I updated the logic for the cycle action widget as well as the temporary mode widget to reflect the additional functionality in GremlinEx.

https://github.com/muchimi/JoystickGremlinEx/releases/download/13.40.16ex_m/joystick_gremlin_13_40_16_m3.zip

Starting with this mode configuration: image

Adding this mapping to button 3 to the default SCM mode (and not mapped in any other mode) image

Adding this mapping to button 5 to the default SCM mode (and not mapped in any other mode): image

on my system produces the following behavior in m3:

Before the code fixes, the temporary mode switch would return to the default mode, which is incorrect, but it was correct at one time before some other back-end logic changed.

Raz0rLegend commented 2 weeks ago

Atm, it works perfectly ! I tried everthing and it's good ! I will remap it with the vjoyremap and i'll send you a return. :)