Hello,
i have Sw1 set up as BUTTONAlt on both positions . When i push up and release, logical button 17 toggle and stay ON, second time push up and button 17 toggle to OFF. same on opposite position (down) logical button 18.
I would need to program so that only one logical button is ON at a time.
When i push Sw1 up or down, toggle respective logical button, but if opposite is ON, turn it OFF. How, please?
Gladiator NXT Sw1 as rocker switch
Moderator: AdminGroup
Re: Gladiator NXT Sw1 as rocker switch
Jukelo — 09/15/2024 10:42 AM
So this mostly works: change Physical 3 and 4 to No Function (don't change the logical output). In the boolean tab add two RT trigger booleans like so (note the inputs and outputs are switched around). This will latch the virtual outputs of either button when the physical button is pressed, and unlatch it when the other physical button is pressed.
The issue is for some reason the Physical 3 latch is on at joystick initialization, like Physical 3 pulses briefly on its own. I don't know if it's something with my device or the design of the thing. It's easy enough to ignore if you make sure to press Sw1 Up once when the stick starts to unlatch it. If that's something you don't want, some solution involving Sync might help.
So this mostly works: change Physical 3 and 4 to No Function (don't change the logical output). In the boolean tab add two RT trigger booleans like so (note the inputs and outputs are switched around). This will latch the virtual outputs of either button when the physical button is pressed, and unlatch it when the other physical button is pressed.
The issue is for some reason the Physical 3 latch is on at joystick initialization, like Physical 3 pulses briefly on its own. I don't know if it's something with my device or the design of the thing. It's easy enough to ignore if you make sure to press Sw1 Up once when the stick starts to unlatch it. If that's something you don't want, some solution involving Sync might help.
Re: Gladiator NXT Sw1 as rocker switch
Jukelo — 09/15/2024 11:12 AM
Okay second take. If you run into the issue of the P3 RT trigger latching on initialization here's what can fix that:
The P3 latch on Boolean 3 now toggles when Boolean 1 sends true instead of when P3 is pressed.
Boolean 1 needs both a signal from P3 and Boolean 2 to return true.
Boolean 2 is a latch returning true after P3 is pressed, its Reset input is boolean 127 (there is no such thing) so it never unlatches.
Boolean 2 is executed after Boolean 1 (booleans are executed in order), so by the time P3 pulses, Boolean 1 has already set its value to false. When Boolean 3 is run, even though P3 has pulsed already and Boolean 2 return true, Boolean 1 is still off and Boolean 3 does not latch. Fortunately the P3 pulse seems short enough to not last until the next boolean loop.
Okay second take. If you run into the issue of the P3 RT trigger latching on initialization here's what can fix that:
The P3 latch on Boolean 3 now toggles when Boolean 1 sends true instead of when P3 is pressed.
Boolean 1 needs both a signal from P3 and Boolean 2 to return true.
Boolean 2 is a latch returning true after P3 is pressed, its Reset input is boolean 127 (there is no such thing) so it never unlatches.
Boolean 2 is executed after Boolean 1 (booleans are executed in order), so by the time P3 pulses, Boolean 1 has already set its value to false. When Boolean 3 is run, even though P3 has pulsed already and Boolean 2 return true, Boolean 1 is still off and Boolean 3 does not latch. Fortunately the P3 pulse seems short enough to not last until the next boolean loop.
Re: Gladiator NXT Sw1 as rocker switch
thank you, i`ll try,
is there a newer Njoy32 Controller User guide ? 2.19 seems to be a little outdated.
is there a newer Njoy32 Controller User guide ? 2.19 seems to be a little outdated.
Return to “Manuals and Howtos”
Who is online
Users browsing this forum: No registered users and 3 guests