Created
June 3, 2015 21:10
-
-
Save juuba/6087a8a2444ceda8d11f to your computer and use it in GitHub Desktop.
FreePIE + vJoy script for CH Combatstick wheel-axis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# FreePIE + vJoy script for CH Combatstick Wheel | |
# from https://www.reddit.com/r/hoggit/comments/384bkn/ch_fighterstick_throttle_wheel_has_jitter_any_fix/crspxso | |
range = 1000 # Not sure if this is ever not 1000 in FreePIE. Set to maximum value of "input" | |
deadzone = 16 # Deadzone relative to "range" above. With my X-55 rotary, the granularity was 8, so at 16 this gives 2 units of deadzone. | |
input = joystick[2].z # Change this to whatever joystick and axis is your slider | |
if starting: | |
deadzoneStart = 0 | |
if input > (deadzoneStart + deadzone): | |
deadzoneStart = input - deadzone | |
elif input < deadzoneStart: | |
deadzoneStart = input | |
output = ((deadzoneStart + deadzone/2) * vJoy[0].axisMax)/(range - deadzone/2) | |
vJoy[0].slider = output | |
diagnostics.watch(output) | |
diagnostics.watch(input) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment