Jump to content
TheHarvesteR

A fix for Full Axis throttle mapping

Recommended Posts

can someone upload the tools to dropbox or something? Links are dead and in internet it is not so easy to find a secure place to install those programs..

Share this post


Link to post
Share on other sites

This worked for me. (Thrustmaster Warthog HOTAS Throttle, with Joystick and CH Pro Pedals) I used vJoy and FreePIE. Nothing fancy, but it's something and works reasonably for a first iteration of the script. Tried it with AH-6 for a few minutes.

 

You may need to change the number in brackets after "joystick" to correspond to your setup, as per previous posts in this thread have mentioned. So nothing new there...

def update():

	vJoy[0].x = (joystick[2].z)
	
if starting:
	virtualAxisMax = vJoy[0].axisMax
	joystick[2].setRange(0, virtualAxisMax)
	freeTrack.update += update
	
#diagnostics.watch(joystick[2].z)
#diagnostics.watch(vJoy[0].x)

The last two commented lines are for dev/debug purposes, uncomment them if you want to view the raw values in vJoyMonitor.

 

(Haven't tried it with how it affects the plane throttle, which is mapped to the same throttle but directly without vJoy/FreePIE modifications inbetween. Will report back if it fouls things up and the script needs to be edited.)

 

can you explain more how to setup the tools which you used? I am getting error message when I run that script with freepie..

Share this post


Link to post
Share on other sites

For those who wish to use the Thrustmaster TWCS throttle, I've thrown together a FreePIE script which utilises all of the buttons and applies the full-range-throttle-fix as per other comments here.

 

The throttle and vJoy ID numbers can be changed simply in the script, without needing to change every reference by using THROTTLE_ID and VJOY_ID respectively.

 

Hope this helps!

 

# Thrustmaster TWCS Mapping Script for Arma 3 with FreePIE
# Fixes throttle issues associated with Arma 3.
# By firebyte
# https://forums.bistudio.com/topic/104325-a-fix-for-full-axis-throttle-mapping/

# When plugging and unplugging your devices, the ID number
# of your device may change. Rather than trying to find
# each reference to the device in the script, just change
# the respective values below.

# THROTTLE_ID is the ID number of your physical TWCS throttle.

# VJOY_ID is the ID number of the vJoy instance your TWCS throttle
# is supposed to pass data to, from FreePIE.

THROTTLE_ID = 0
VJOY_ID = 0

# There has been discussion about adding referencing for devices 
# by name here: http://www.mtbs3d.com/phpBB/viewtopic.php?f=139&t=21709
# NOTE: This will require a custom build of FreePIE, as discussed in the
# thread.

def update():

	# TWCS Ministick 2 (X,Y)
	vJoy[VJOY_ID].x = (joystick[THROTTLE_ID].x)
	vJoy[VJOY_ID].y = (joystick[THROTTLE_ID].y)
	
	# TWCS Throttle Axis (Z)
	vJoy[VJOY_ID].z = (joystick[THROTTLE_ID].z)
	
	# TWCS Rocker Axis (RZ)
	vJoy[VJOY_ID].rz = (joystick[THROTTLE_ID].zRotation)
	
	# TWCS Antenna Axis (Slider 0)
	vJoy[VJOY_ID].dial = (joystick[THROTTLE_ID].sliders[0])
	
	# TWCS 8-directional POV (aka D-Pad)
	# setAnalogPOV() is used to update the POV hat's
	# direction, when the hat is used on the controller.
	vJoy[VJOY_ID].setAnalogPov(0, joystick[THROTTLE_ID].pov[0])
		
	
if starting:
	virtualAxisMax = vJoy[VJOY_ID].axisMax
	joystick[THROTTLE_ID].setRange(0, virtualAxisMax)
	vJoy[VJOY_ID].dial = joystick[THROTTLE_ID].sliders[1]
	freeTrack.update += update
	
# Buttons are programmed as labelled on TWCS Throtlle Manual
# found at http://ts.thrustmaster.com/download/accessories/manuals/TWCS_throttle/TWCS_Throttle_Manual_All.pdf

# Python is a zero-index language, meaning that Button 1 
# is Button 0 when accessed programmatically.

# Button 1
if joystick[THROTTLE_ID].getDown(0):
	vJoy[VJOY_ID].setPressed(0)

# Button 2
if joystick[THROTTLE_ID].getDown(1):
	vJoy[VJOY_ID].setPressed(1)

# Button 3
if joystick[THROTTLE_ID].getDown(2):
	vJoy[VJOY_ID].setPressed(2)

# Button 4
if joystick[THROTTLE_ID].getDown(3):
	vJoy[VJOY_ID].setPressed(3)

# Button 5
if joystick[THROTTLE_ID].getDown(4):
	vJoy[VJOY_ID].setPressed(4)

# Button 6 (TWCS Ministick Momentary Push Button)
if joystick[THROTTLE_ID].getDown(5):
	vJoy[VJOY_ID].setPressed(5)

# Button 7
if joystick[THROTTLE_ID].getDown(6):
	vJoy[VJOY_ID].setPressed(6)

# Button 8
if joystick[THROTTLE_ID].getDown(7):
	vJoy[VJOY_ID].setPressed(7)

# Button 9
if joystick[THROTTLE_ID].getDown(8):
	vJoy[VJOY_ID].setPressed(8)

# Button 10
if joystick[THROTTLE_ID].getDown(9):
	vJoy[VJOY_ID].setPressed(9)

# Button 11
if joystick[THROTTLE_ID].getDown(10):
	vJoy[VJOY_ID].setPressed(10)

# Button 12
if joystick[THROTTLE_ID].getDown(11):
	vJoy[VJOY_ID].setPressed(11)

# Button 13
if joystick[THROTTLE_ID].getDown(12):
	vJoy[VJOY_ID].setPressed(12)

# Button 14
if joystick[THROTTLE_ID].getDown(13):
	vJoy[VJOY_ID].setPressed(13)
	

# DIAGNOSTICS

# TWCS Ministick 2 (X,Y)
diagnostics.watch(joystick[THROTTLE_ID].x)
diagnostics.watch(joystick[THROTTLE_ID].y)

# TWCS Throttle Axis (Z)
diagnostics.watch(joystick[THROTTLE_ID].z)

# TWCS Rocker Axis (RZ)
diagnostics.watch(joystick[THROTTLE_ID].zRotation)

# TWCS Antenna Axis (Slider 0)
diagnostics.watch(joystick[THROTTLE_ID].sliders[0])

# TWCS 8-directional POV (aka D-Pad)
diagnostics.watch(joystick[THROTTLE_ID].pov[0])

# Button 0
diagnostics.watch(joystick[THROTTLE_ID].getDown(0))

# Button 1
diagnostics.watch(joystick[THROTTLE_ID].getDown(1))

# Button 2
diagnostics.watch(joystick[THROTTLE_ID].getDown(2))

# Button 3
diagnostics.watch(joystick[THROTTLE_ID].getDown(3))

# Button 4
diagnostics.watch(joystick[THROTTLE_ID].getDown(4))

# Button 5
diagnostics.watch(joystick[THROTTLE_ID].getDown(5))

# Button 6
diagnostics.watch(joystick[THROTTLE_ID].getDown(6))

# Button 7
diagnostics.watch(joystick[THROTTLE_ID].getDown(7))

# Button 8
diagnostics.watch(joystick[THROTTLE_ID].getDown(8))

# Button 9
diagnostics.watch(joystick[THROTTLE_ID].getDown(9))

# Button 10
diagnostics.watch(joystick[THROTTLE_ID].getDown(10))

# Button 11
diagnostics.watch(joystick[THROTTLE_ID].getDown(11))

# Button 12
diagnostics.watch(joystick[THROTTLE_ID].getDown(12))

# Button 13
diagnostics.watch(joystick[THROTTLE_ID].getDown(13))

# Button 14
diagnostics.watch(joystick[THROTTLE_ID].getDown(14))

 

  • Like 1

Share this post


Link to post
Share on other sites
On 1/15/2017 at 1:44 AM, firebyte said:

For those who wish to use the Thrustmaster TWCS throttle, I've thrown together a FreePIE script which utilises all of the buttons and applies the full-range-throttle-fix as per other comments here.

 

The throttle and vJoy ID numbers can be changed simply in the script, without needing to change every reference by using THROTTLE_ID and VJOY_ID respectively.

 

Hope this helps!

 


# Thrustmaster TWCS Mapping Script for Arma 3 with FreePIE
# Fixes throttle issues associated with Arma 3.
# By firebyte
# https://forums.bistudio.com/topic/104325-a-fix-for-full-axis-throttle-mapping/

# When plugging and unplugging your devices, the ID number
# of your device may change. Rather than trying to find
# each reference to the device in the script, just change
# the respective values below.

# THROTTLE_ID is the ID number of your physical TWCS throttle.

# VJOY_ID is the ID number of the vJoy instance your TWCS throttle
# is supposed to pass data to, from FreePIE.

THROTTLE_ID = 0
VJOY_ID = 0

# There has been discussion about adding referencing for devices 
# by name here: http://www.mtbs3d.com/phpBB/viewtopic.php?f=139&t=21709
# NOTE: This will require a custom build of FreePIE, as discussed in the
# thread.

def update():

	# TWCS Ministick 2 (X,Y)
	vJoy[VJOY_ID].x = (joystick[THROTTLE_ID].x)
	vJoy[VJOY_ID].y = (joystick[THROTTLE_ID].y)
	
	# TWCS Throttle Axis (Z)
	vJoy[VJOY_ID].z = (joystick[THROTTLE_ID].z)
	
	# TWCS Rocker Axis (RZ)
	vJoy[VJOY_ID].rz = (joystick[THROTTLE_ID].zRotation)
	
	# TWCS Antenna Axis (Slider 0)
	vJoy[VJOY_ID].dial = (joystick[THROTTLE_ID].sliders[0])
	
	# TWCS 8-directional POV (aka D-Pad)
	# setAnalogPOV() is used to update the POV hat's
	# direction, when the hat is used on the controller.
	vJoy[VJOY_ID].setAnalogPov(0, joystick[THROTTLE_ID].pov[0])
		
	
if starting:
	virtualAxisMax = vJoy[VJOY_ID].axisMax
	joystick[THROTTLE_ID].setRange(0, virtualAxisMax)
	vJoy[VJOY_ID].dial = joystick[THROTTLE_ID].sliders[1]
	freeTrack.update += update
	
# Buttons are programmed as labelled on TWCS Throtlle Manual
# found at http://ts.thrustmaster.com/download/accessories/manuals/TWCS_throttle/TWCS_Throttle_Manual_All.pdf

# Python is a zero-index language, meaning that Button 1 
# is Button 0 when accessed programmatically.

# Button 1
if joystick[THROTTLE_ID].getDown(0):
	vJoy[VJOY_ID].setPressed(0)

# Button 2
if joystick[THROTTLE_ID].getDown(1):
	vJoy[VJOY_ID].setPressed(1)

# Button 3
if joystick[THROTTLE_ID].getDown(2):
	vJoy[VJOY_ID].setPressed(2)

# Button 4
if joystick[THROTTLE_ID].getDown(3):
	vJoy[VJOY_ID].setPressed(3)

# Button 5
if joystick[THROTTLE_ID].getDown(4):
	vJoy[VJOY_ID].setPressed(4)

# Button 6 (TWCS Ministick Momentary Push Button)
if joystick[THROTTLE_ID].getDown(5):
	vJoy[VJOY_ID].setPressed(5)

# Button 7
if joystick[THROTTLE_ID].getDown(6):
	vJoy[VJOY_ID].setPressed(6)

# Button 8
if joystick[THROTTLE_ID].getDown(7):
	vJoy[VJOY_ID].setPressed(7)

# Button 9
if joystick[THROTTLE_ID].getDown(8):
	vJoy[VJOY_ID].setPressed(8)

# Button 10
if joystick[THROTTLE_ID].getDown(9):
	vJoy[VJOY_ID].setPressed(9)

# Button 11
if joystick[THROTTLE_ID].getDown(10):
	vJoy[VJOY_ID].setPressed(10)

# Button 12
if joystick[THROTTLE_ID].getDown(11):
	vJoy[VJOY_ID].setPressed(11)

# Button 13
if joystick[THROTTLE_ID].getDown(12):
	vJoy[VJOY_ID].setPressed(12)

# Button 14
if joystick[THROTTLE_ID].getDown(13):
	vJoy[VJOY_ID].setPressed(13)
	

# DIAGNOSTICS

# TWCS Ministick 2 (X,Y)
diagnostics.watch(joystick[THROTTLE_ID].x)
diagnostics.watch(joystick[THROTTLE_ID].y)

# TWCS Throttle Axis (Z)
diagnostics.watch(joystick[THROTTLE_ID].z)

# TWCS Rocker Axis (RZ)
diagnostics.watch(joystick[THROTTLE_ID].zRotation)

# TWCS Antenna Axis (Slider 0)
diagnostics.watch(joystick[THROTTLE_ID].sliders[0])

# TWCS 8-directional POV (aka D-Pad)
diagnostics.watch(joystick[THROTTLE_ID].pov[0])

# Button 0
diagnostics.watch(joystick[THROTTLE_ID].getDown(0))

# Button 1
diagnostics.watch(joystick[THROTTLE_ID].getDown(1))

# Button 2
diagnostics.watch(joystick[THROTTLE_ID].getDown(2))

# Button 3
diagnostics.watch(joystick[THROTTLE_ID].getDown(3))

# Button 4
diagnostics.watch(joystick[THROTTLE_ID].getDown(4))

# Button 5
diagnostics.watch(joystick[THROTTLE_ID].getDown(5))

# Button 6
diagnostics.watch(joystick[THROTTLE_ID].getDown(6))

# Button 7
diagnostics.watch(joystick[THROTTLE_ID].getDown(7))

# Button 8
diagnostics.watch(joystick[THROTTLE_ID].getDown(8))

# Button 9
diagnostics.watch(joystick[THROTTLE_ID].getDown(9))

# Button 10
diagnostics.watch(joystick[THROTTLE_ID].getDown(10))

# Button 11
diagnostics.watch(joystick[THROTTLE_ID].getDown(11))

# Button 12
diagnostics.watch(joystick[THROTTLE_ID].getDown(12))

# Button 13
diagnostics.watch(joystick[THROTTLE_ID].getDown(13))

# Button 14
diagnostics.watch(joystick[THROTTLE_ID].getDown(14))

Thank you so much, my controls are just fine in arma 3 but arma 2 never worked. It will be nice to actually have good controls for the jets and helo's

 

Share this post


Link to post
Share on other sites

Hello Friends, @Devastator_cm @Hellion_FI

 

i also have that Throttle Problem with my Thrustmaster Cougar HOTAS.

 

I installed the vJoy and FreePIE Apps, but i really have absolutely no clew what to do then, where exactly put the scripts in..

 

May someone help me with that?

 

My System:  A3 full, Windows 10 x64 Pro, Thrustmaster Cougar HOTAS, Thrustmaster Cougar MFDs, Simped F-16C Gameport Rudders (they´re connected to the Cougar Stick), TrackIR5

 

Many thanks

 

Cheers

 

Fixed it, works as a charm now ^^

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×