Jump to content

Thrustmaster Combined Full DX Mapping (extending the 32 DX buttons limit)


Recommended Posts

10 hours ago, Sabre said:

4. Then I reassigned my axes in the sim as needed. Now the T.Flight Rudder Pedals are in the Combined game controller and the dead zone and response curve are adjusted as I wanted them to be.

You see, finally Target Script Editor is not "way over" your head...

Link to comment
Share on other sites

15 hours ago, sedenion said:

You see, finally Target Script Editor is not "way over" your head...

It definitely still is sedenion, I can only guess some patterns in the relevant files with your help.

I use Throttle's SlewX and Y in digital mode. Is it possible to increase the 0 range between DX outputs? Or it doesn't work like this in digital mode?

Thank you. 


Edited by Sabre
Link to comment
Share on other sites

9 hours ago, Sabre said:

I use Throttle's SlewX and Y in digital mode. Is it possible to increase the 0 range between DX outputs? Or it doesn't work like this in digital mode?

I guess you mean the neutral position dead zone. Yes you can, I already did it in a development stage on my side. You have to modify the MapThrottle.tmh file at line 160 and 161, replace the original lines by the following ones:

  // -- Digital Axes Mapping ---------------------------------------------------
  if(DIGITAL_SCY) { KeyAxis(&Dev, SCY,    '', AXMAP2(LIST(0, 1, 99, 100),   DX90,    0, DX92)); }
  if(DIGITAL_SCX) { KeyAxis(&Dev, SCX,    '', AXMAP2(LIST(0, 1, 99, 100),   DX93,    0, DX91)); }

Notice that the first parameter of AXMAP2() function turned from '3' to a another macro function call LIST. This list enumerates the "stop" positions of each triggering section of the digital axis. In the above setup positions, expressed in percent, axis is divided in 3 zones delimited by 4 stops : 0, 1, 99 and 100, which is schematically like this:

0   1                                                                         99  100
|--|---------------------------------------------------------------------------|--|
 DX                                      0                                      DX
Link to comment
Share on other sites

  • 1 month later...

Is there a way to assign a pulse upon release of a switch rather than a hold off state?

For example: Say I want to use the Warthog Throttle's boat switch to switch between A/A - NAV - A/G. Now the Hornet has no "NAV" button. Instead if you are in A/A mode you go to NAV mode by pressing A/A again. What I need is this:

Boat Switch Forward, press: A/A Mode
Boat Switch Forward, release: A/A Mode
Boat Switch Back, press: A/G Mode
Boat Switch Back, release: A/G Mode

Link to comment
Share on other sites

@Hairysteed

Here is the code from my Target script:

// -- AP (Autopilot LASTE Switch) ------------------------------------------

MapKey( &Throttle, APPAT, CHAIN(PULSE + DX65, D(), PULSE + DX41)); // AA Mode & External Lights Off

MapKeyR( &Throttle, APPAT, CHAIN(PULSE + DX65, D(), PULSE + DX40)); // AA Mode Off & Lights On

MapKey( &Throttle, APALT, CHAIN(PULSE + DX67, D(), PULSE + DX41)); // AG Mode & External Lights Off

MapKeyR( &Throttle, APALT, CHAIN(PULSE + DX67, D(), PULSE + DX40)); // AG Mode Off & Lights On

 

Link to comment
Share on other sites

On 11/8/2022 at 8:00 PM, Hairysteed said:

Is there a way to assign a pulse upon release of a switch rather than a hold off state?

For example: Say I want to use the Warthog Throttle's boat switch to switch between A/A - NAV - A/G. Now the Hornet has no "NAV" button. Instead if you are in A/A mode you go to NAV mode by pressing A/A again. What I need is this:

Boat Switch Forward, press: A/A Mode
Boat Switch Forward, release: A/A Mode
Boat Switch Back, press: A/G Mode
Boat Switch Back, release: A/G Mode

 

@Trigati had the good approach, however its example is a bit confusing. To acheive what you want, and if you use the mapping I created, you have to modify the mapping commands within the MapThrottle.tmh (in the mapping folder) at lines 53 to 56:

// Disable original mapping function by make them comments
// MapKey( &Dev,    BSF,      DX34);
// MapKey( &Dev,    BSB,      DX35);
// MapKey( &Dev,    BSM,      DX36);

// Add new mapping functions
MapKey(  &Dev,   BSF,     PULSE+DX34);  //< Press
MapKeyR( &Dev,   BSF,     PULSE+DX34);  //< Release
MapKey(  &Dev,   BSB,     PULSE+DX35);  //< Press
MapKeyR( &Dev,   BSB,     PULSE+DX35);  //< Release
  • Like 2
Link to comment
Share on other sites

On 11/13/2022 at 12:40 PM, simo1000rr said:

Hello  All . I have only the thrustmaster warthog throttle device without the joystick part as i use another joystick , can i still use this script with the throttle only or will it cause errors if i run it ??

This should work fine, anyway, the script allow you to disable (exclude) any device, see the main *.tmc file for instructions.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

Sedenion … you are my hero! You have excellent skills and more important you are willing to share! Much much appreciated!  @all: is anybody out there who already finalized aTARGET script, based on this one, for the 4.37 BMS and is willing to share? Here or by PM? Thx in advance flex 


Edited by desmoflex
Typo
Link to comment
Share on other sites

Have anyone tried this with only the Warthog throttle attached?

I asked becourse I exchanged my worn out stick with a VKB stick, and a throttle only configuration seems to generate errors.

Joystick: VKB Gunfighter w. Space Combat Grip

Throttle: TM Warthog (#495)

Pedals: MFG Crosswind v2

Link to comment
Share on other sites

39 minutes ago, Starfire said:

Have anyone tried this with only the Warthog throttle attached?

I asked becourse I exchanged my worn out stick with a VKB stick, and a throttle only configuration seems to generate errors.

Errors should not be blocking. You can disable the stick within the main script entry (Run_Complete.tmc and Run_Simplified.tmc) by setting the following macro to 0:

define USE_JOYSTICK     0         //< HOTAS Warthog A10/F16 Grip
define USE_JOYSTICKF18  0         //< HOTAS Warthog F18 Grip

Edited by sedenion
  • Thanks 1
Link to comment
Share on other sites

Exactly - also only using Throttle without any problems…

  • Like 1

PC: Asus ROG Strix B650E-F Gaming | AMD Ryzen 7800X3D | Palit GeForce RTX 4090 Game Rock OC | 64 GB Patriot VIPER VENOM DDR5-6000

Input: Brunner CLS-E FFB Base | Thrustmaster Warthog Joystick & Throttle | Thrustmaster TPR Pendular Rudder | WinWing Phoenix MIP (VR) - F16 ICP - PTO2 | VPC SharKA-50 Collective 

VR: HP Reverb G2

Motion-Platform: Motionsystems PS-6TM-150 | Monstertech MTX

Youtube: https://www.youtube.com/@madmontys6dofmotionplatfor386/featured

Link to comment
Share on other sites

On 1/22/2023 at 2:09 PM, sedenion said:

Errors should not be blocking. You can disable the stick within the main script entry (Run_Complete.tmc and Run_Simplified.tmc) by setting the following macro to 0:

define USE_JOYSTICK     0         //< HOTAS Warthog A10/F16 Grip
define USE_JOYSTICKF18  0         //< HOTAS Warthog F18 Grip

 

Thanks.

I won't have time to look into it before wensday.

Flying tonight 🙂

 

Joystick: VKB Gunfighter w. Space Combat Grip

Throttle: TM Warthog (#495)

Pedals: MFG Crosswind v2

Link to comment
Share on other sites

I changed the the code pieces as you wrote in both the simplified version.

Both compile successfully, but I still get Runtime error when I run them:

Quote

Runtime Error: Symbol not found: JoystickF18 in main ( line 181 in Run_Complete.tmc )

 

Line 181:

Quote

 if(!USE_JOYSTICKF18) Configure(&JoystickF18, MODE_EXCLUDED);

Part of the Main 😉

 

Joystick: VKB Gunfighter w. Space Combat Grip

Throttle: TM Warthog (#495)

Pedals: MFG Crosswind v2

Link to comment
Share on other sites

30 minutes ago, Starfire said:

I changed the the code pieces as you wrote in both the simplified version.

Both compile successfully, but I still get Runtime error when I run them:

 

Line 181:

Part of the Main 😉

 

I just did a complete reinstall of the Target software and ran it without any issues.
Ill get back ASAP.
 

Joystick: VKB Gunfighter w. Space Combat Grip

Throttle: TM Warthog (#495)

Pedals: MFG Crosswind v2

Link to comment
Share on other sites

2 minutes ago, Starfire said:

I just did a complete reinstall of the Target software and ran it without any issues.
Ill get back ASAP.
 

Thanks for the Help. It seems that I got all DX buttons.

As shame my stick was worn out and I can't afford the Force feedback upgrade from VP Force 🙂

As this would let me use the Warthog stick again.


Are there any way the VKB could be controlled by the Target script?
I have had the Warthog since it was released.
And no stick on the marked has had as powerfull a software as the TM Target.

Unfortunately the buildquality/design of the Warthog is crap.
I dont know how many times I refirbished the stick, but the design flaw can never be fixed. It would be to expensive 😔
 

 

Joystick: VKB Gunfighter w. Space Combat Grip

Throttle: TM Warthog (#495)

Pedals: MFG Crosswind v2

Link to comment
Share on other sites

Since I am in lack of a controller (the stick).
If I want to program the throttle as I use to do, with layers by using the Boat-switch, what do I need to do?

I also used to have a functionality with the Autopilot Engage/Disingage[APENG] combined with the Autpilot Select switch [APPAT]/[APAH]/[APALT].

Where will I have to place this in order not to screw up this marvulous directX bonanza?


Edited by Starfire

Joystick: VKB Gunfighter w. Space Combat Grip

Throttle: TM Warthog (#495)

Pedals: MFG Crosswind v2

Link to comment
Share on other sites

10 hours ago, Starfire said:

Are there any way the VKB could be controlled by the Target script?

Nop, TARGET Script work with TM drivers, and TM drivers only recognize TM hardware.

 

9 hours ago, Starfire said:

Since I am in lack of a controller (the stick).
If I want to program the throttle as I use to do, with layers by using the Boat-switch, what do I need to do?

I also used to have a functionality with the Autopilot Engage/Disingage[APENG] combined with the Autpilot Select switch [APPAT]/[APAH]/[APALT].

Where will I have to place this in order not to screw up this marvulous directX bonanza?

You should edit the MapThrottle.thm file within the mapping folder to write your own mapping. The script already embeds advanced AP/LAST switch functioning, but you can wrote your own.

  • Thanks 1
Link to comment
Share on other sites

6 hours ago, sedenion said:

Nop, TARGET Script work with TM drivers, and TM drivers only recognize TM hardware.

Exception are VIRPIL (bases) where you can rewrite the VID number making Target believe it's a Warthog stick/base.

  • Thanks 1

Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind combat pedals, TrackIR4, Rift-S.

Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!

Link to comment
Share on other sites

33 minutes ago, Lange_666 said:

Exception are VIRPIL (bases) where you can rewrite the VID number making Target believe it's a Warthog stick/base.

Interesting... reading code in the hid.tmh file (one of the stock Target header file), there is a function declaration that take hardware VID as parameters, function used to initialize the script... here some code samples. This may be a way to add some non-TM hardware. Unfortunately I cannot test myself since I have only TM hardware.

in hid.tmh :
 

//Selects a USB device, installs the filter driver, disables the associated HID device
//and assigns the device to joy# following the call order (1st call assigns joy1, 2nd call joy2, etc.)
//usbHwid - hardware ID of the device (HWID_* arrays can be used)
//device mode:
//    0-disable physical device
//    1-keep physical device, gather input from device
//    2-keep physical device, process device input (not fully supported, uses EV_HID_INPUT_DATA_FULL)
//returns: >=0 on success representing the device's index, <0 on error
int SelectUsbDevice(alias usbHwid, byte deviceMode=0){}

In target.tmh (6)

alias Throttle    = "VID_044F&PID_0404", Joystick    = "VID_044F&PID_0402", LMFD    = "VID_044F&PID_b351";
alias RMFD      = "VID_044F&PID_b352", HCougar    = "VID_044F&PID_0400", T16000  = "VID_044F&PID_B10A";

In target.tmh (171)

int Select(alias id)
{ 
  int i = id[0];
  id[0] = 'V';
  if(i == MODE_EXCLUDED) return -1; 
  else if(i == MODE_KEEPENABLED) return SelectUsbDevice(&id, 1);
  else if(i == MODE_FILTERED) return SelectUsbDevice(&id, 2);
  return SelectUsbDevice(&id);  // 0
}

In target.tmh (186)

int Init(alias h, int cfg=CREATE_JOYSTICK+CREATE_KEYBOARD+CREATE_MOUSE)
{ 
  &Throttle = GetIndexJoy(Select(&Throttle));  // expect a Warthog Throttle to be plugged on USB
  &Joystick = GetIndexJoy(Select(&Joystick));  // expect a Warthog Stick to be plugged on USB

 

  • Thanks 1
Link to comment
Share on other sites

Hi,

I released a new version of the mapping scripts. This version introduce new presets to provide three level of complexity. It also changes and fix some problems of the previous version:

  • Button numbers assignment changed
  • Introduce new Simple, Hybrid and Complex mapping presets
  • Digital Axis mapping for Friction Control slider now has middle position
  • Fix F-18 Grip Hat1 I/O Mapping working in inverted mode
  • FLAPS Switch LED now light up from MVR position instead of DN position

Beware, this version changes the buttons numbers assignment, if you replace this versions by an older one, you may need to re-assign some buttons (especially long-press, digital axes and Hat1 S3 In buttons)

Here are the new available presets:

  • "Simple": Only translate hardware buttons with Middle and Off switches positions
  • "Hybrid": Enable S3 I/O mode for Hat1 and Digital Axes Buttons for Throttle SC (Micro Stick) and FC Slider.
  • "Complex": Enable S3 I/O mode for Hat1, Digital Axes buttons, Long-Press buttons and advanced AP button and LASTES switch behavior.

The script also now comes with a "run_custom.tmc" file intended to be modified by user to create his own custom preset (obviously, you also can rename the file, and create as many preset as you want by copying any .tmc file and create your own, the "run_custom.tmc" file is only here to make clear that you CAN create a custom preset).

Download link details in the first post of this topic

Link to comment
Share on other sites

Hi
The script is amazing.
I found a small error, in the files:
Run_Complex.tmc
Run_Custom.tmc
Run_Hybrid.tmc
Run_Simple.tmc
there is a typo
  If(USE_TFRPHA) MapTFRPRHAudder();
and it should be
  if(USE_TFRPHA) MapTFRPHARudder();
This caused a problem for me with the Thrustmaster TPR Pendular Rudder.

I have a question, is it possible to assign LED on/off to the L/G WRN SILENCE key? So that it would be possible with a press to turn the LED on and another press to turn it off. Similar to how it works with the AUTOPILOT ENGAGE/DISENGAGE key.

Regards, Pio.

Link to comment
Share on other sites

18 hours ago, markov5 said:

I found a small error, in the files:
Run_Complex.tmc
Run_Custom.tmc
Run_Hybrid.tmc
Run_Simple.tmc
there is a typo
  If(USE_TFRPHA) MapTFRPRHAudder();
and it should be
  if(USE_TFRPHA) MapTFRPHARudder();
This caused a problem for me with the Thrustmaster TPR Pendular Rudder.

Thanks for the report, I will publish a corrected version

18 hours ago, markov5 said:

I have a question, is it possible to assign LED on/off to the L/G WRN SILENCE key? So that it would be possible with a press to turn the LED on and another press to turn it off. Similar to how it works with the AUTOPILOT ENGAGE/DISENGAGE key.

It's not pre-implemented in my script, but in absolute, yes, you can, by writing your own custom mapping. Your chance is that some time ago I coded an additional module that implement a Toggle function to do exactly what you want, and despite the fact this module is not currently used, the file is in the modules folder and you can use it. There is even the include statement ready to be enabled in the MapThrottle.tmh file.

So in the MapThrottle.tmh file, go to the line 11 and remove the comments marks ("//") to enable the line, like that:

// -----------------------------------------------------------------------------
include "modules/ModTGL.tmh"              //< TGL() command Module
include "modules/ModAP.tmh"               //< Advanced AP Module

Then go to the line 112 and 113 where you'll find the mapping calls for LDGH button, and since you want to substitute this mapping, add comments mark to theses line to disable them, like that:

  // -- LDGH (Landing Gear Horn Silence) ---------------------------------------
  //if(LONG_LDGH) { MapKey( &Dev,    LDGH,     TEMPO(DX55, DX96, TEMPO_TIME)); }
  //else          { MapKey( &Dev,    LDGH,     DX55); }

You now can add bellow these lines, the new mapping call that use the special TGL() function, here using Throttle's LED5 for example, keeping DX55 and DX96 which were already assigned to this button :

  MapKey(&Dev, LDGH, TGL(DX55, DX96, &Throttle, LED5));

finaly, you should disable the proper LED mapping in the Run_*.tmc file, for example for LED5 it is at the line 129, simply replace "LED5" by "0", like this:

define LED_FLAP         0         //< Throttle  FLAPD/FLAPU Switch

 


Edited by sedenion
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...