Ah, I don't have an X55. I have a modded TM Warthog throttle.
I use the left throttle handle for speed limiter with 2 detents, one at 50% where I put SCM speed, one at 20% which I use for landing speed.
The right throttle handle has no detents and I use it as main throttle (strafe) forward, 0 - 100%
I put both at desired position, then I don't touch them anymore. I control speed with the rudder pedals brake axis.
But if you want to use coupled throttle from 0 - 100%, decoupled throttle from -100 - 100%, that is possible with JG. Then you make a plugin with 1 input axis, 2 digital inputs, 1 output axis, 1 digital output.
The input axis will be your throttle axis.
The output axis will be strafe forward / back.
1 digital input will be coupled / decoupled toggle
1 digital input will be toggle the coupled / decoupled state without triggering the digital output
The digital output will toggle SC coupled / decoupled mode.
When set to coupled, output axis = (input axis + 1) / 2 - 1: only the strafe forward portion from the output axis is used.
When set to decoupled, output axis = input axis: the full range of output axis is used.
Something like this. It was a pain to figure out how digital input and output are used, since I never used them
Code:
import gremlin
from gremlin.user_plugin import *
mode = ModeVariable("Mode", "Mode in which to use these settings")
input_axis = PhysicalInputVariable(
"Throttle axis",
"Physical throttle axis",
[gremlin.common.InputType.JoystickAxis]
)
input_toggle = PhysicalInputVariable(
"Toggle Button",
"Button which will toggle coupled / decoupled",
[gremlin.common.InputType.JoystickButton]
)
input_reset = PhysicalInputVariable(
"Reset Button",
"Button which will toggle coupled / decoupled state.",
[gremlin.common.InputType.JoystickButton]
)
output_axis = VirtualInputVariable(
"Throttle output axis",
"Virtual throttle output axis",
[gremlin.common.InputType.JoystickAxis]
)
output_toggle = VirtualInputVariable(
"Button Toggle",
"Button which will be mapped to toggle coupled / decoupled.",
[gremlin.common.InputType.JoystickButton]
)
# Decorators
dec_1 = input_axis.create_decorator(mode.value)
dec_2 = input_toggle.create_decorator(mode.value)
dec_3 = input_reset.create_decorator(mode.value)
class Calculate:
def __init__(self, throttleAxis, toggleButton, toggleState):
self.throttleAxis = throttleAxis
self.toggleButton = toggleButton
self.toggleState = toggleState
def throttle(self):
return self.throttleAxis if self.toggleState else (self.throttleAxis + 1.0) / 2 - 1
def toggle(self):
return self.toggleButton
def state(self):
return self.toggleState
def __str__(self):
return "[{:.2f},{:.2f},{:.2f}]".format(self.throttleAxis, self.toggleButton, self.toggleState)
# Last axis value storage
g_last_values = Calculate(0.0, False, False)
# Updates the vJoy device
def update_vjoy(vjoy):
vjoy[output_axis.value["device_id"]].axis(output_axis.value["input_id"]).value = g_last_values.throttle()
vjoy[output_toggle.value["device_id"]].button(output_toggle.value["input_id"]).is_pressed = g_last_values.toggle()
# Callbacks for the individual axes
@dec_1.axis(input_axis.input_id)
def axis1(event, vjoy):
global g_last_values
g_last_values.throttleAxis = event.value
update_vjoy(vjoy)
@dec_2.button(input_toggle.input_id)
def button_1(event, vjoy):
global g_last_values
g_last_values.toggleButton = event.is_pressed
g_last_values.toggleState = not g_last_values.state() if event.is_pressed else g_last_values.state()
update_vjoy(vjoy)
@dec_3.button(input_reset.input_id)
def button_2(event, vjoy):
global g_last_values
g_last_values.toggleState = not g_last_values.state() if event.is_pressed else g_last_values.state()
update_vjoy(vjoy)
In JG it will like like this