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

m66 - Conditions have no effect on gated axis actions #293

Open
Lolo401 opened this issue Jan 19, 2025 · 11 comments
Open

m66 - Conditions have no effect on gated axis actions #293

Lolo401 opened this issue Jan 19, 2025 · 11 comments
Labels
researching More research shall go into this resolved / verification needed The issue has been resolved and tested but needs additional verification

Comments

@Lolo401
Copy link

Lolo401 commented Jan 19, 2025

I am unsure if this is new with m66 as I have only been replacing all my virtual buttons axis events by gated axis recently. It might have been present in previous releases.

Whenever VJoy conditions are setup on gated axis, those conditions are ignored and the actions are executed regardless. Ex:
In this case, I have Vjoy 9 / Button 40 setup in such a way that when pressed, Auto Boost is enabled at then end of my thrusters axis in SC. If disabled, there is no auto-boost. VJoy 9/40 state is controlled by a switch on the panel.

My Axis (2) Y (Fwd-Aft thrust) was setup like this in the same container:
(1) Vjoy Remap for axis mapping in the game, and
Image

(2) A Gated Axis action to trigger the auto boost at the end of the axis (passing 0.95 and -0.95)
Image

I have tried two different ways to setup conditions:

(1) One global condition on the gated axis container:
Image

(2) Conditions on the gate crossing:
Image

In both cases, when the profile was enabled, Auto Boost would still be activated even if Vjoy 9 Btn 40 was released, indicating that conditions are bypassed entirely when using gated axis.

@Lolo401
Copy link
Author

Lolo401 commented Jan 19, 2025

Note: not isolated to VJoy conditions, the following was tried with Joystick conditions. Same results:

Image

@Lolo401
Copy link
Author

Lolo401 commented Jan 19, 2025

Note 2: Setting up the condition on the entire container resulted in the Vjoy Remap action being deactivated correctly, however the gated axis inputs were not.

@muchimi muchimi added the researching More research shall go into this label Jan 20, 2025
@muchimi
Copy link
Owner

muchimi commented Jan 21, 2025

I'd expect conditions to fail for keyboard, joystick or vjoy because they are all "the same" except in what they check.
Gated axis is weird because it uses nested containers, which is definitely not in the DNA of the original code logic so all is custom for this.

Let me see what I can do about it because I'm pretty sure I coded conditions for nested containers - what I fear is they are being ignored, so thanks for reporting.

@muchimi
Copy link
Owner

muchimi commented Jan 21, 2025

The plot thickens.
I just tested it and it worked for an axis.
The log file trace is correct and the output is correct for mapping a gated range.

Now testing for a gate crossing.

@muchimi
Copy link
Owner

muchimi commented Jan 21, 2025

Found an interesting inversion of button press in the logic for gate crossing. Fixed in the next patch.
This said, functional (outside of the reversal).

@muchimi muchimi added the resolved / verification needed The issue has been resolved and tested but needs additional verification label Jan 21, 2025
@muchimi
Copy link
Owner

muchimi commented Jan 21, 2025

resolved as of m67d and tested ok.

@Lolo401
Copy link
Author

Lolo401 commented Jan 21, 2025

Tested ok when conditions are set inside the Gated Axis:
Image

However, when the condition is set on the gated axis action it self, it is ignored:
Image

@Lolo401
Copy link
Author

Lolo401 commented Jan 21, 2025

Update:
When the condition is set to the container inside a gate or range, it is ignored:
Image

At this point in time, the only way, in my conditions, to have conditions work is to set them on the Action inside the container inside the gated axis. Any attempt to set a global condition on the gated axis or containers will get ignored.

@Lolo401
Copy link
Author

Lolo401 commented Jan 21, 2025

In other words: highlighted in green works, in red does not.

Image

@Lolo401
Copy link
Author

Lolo401 commented Jan 21, 2025

Not a huge issue as there is a workaround: set the condition at the lowest level of execution. But it would make life easier if we could set a condition on the Gated axis as a whole. Especially if there are a lot of gates or ranges.

@muchimi
Copy link
Owner

muchimi commented Jan 31, 2025

m70 had some enhancements around condition evaluation and tracing.
Is this still occurring?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
researching More research shall go into this resolved / verification needed The issue has been resolved and tested but needs additional verification
Projects
None yet
Development

No branches or pull requests

2 participants