Welcome to JG51 "Mölders"

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

Sign in to follow this  
Followers 0

getting the most out of the ThrustMaster with Target

after buying these for my rig i started with the 4.5 patch and I'm having a hard time not killing myself 



so I thought I would work on my joystick to see if I could make my life easier.

First thing I learned was that I could put all of the startup crap on 1 switch and 1 push button.

on one 3 pos switch I have my fuel open, my sight illum, my interior illum, open oil rad (continues  until i pull the switch to center pos), open water rad (same as Oil), turn prop pitch automation off, run prop pitch up (same as oil). pulling the switch back to the center pos cancels the opening of the oil rad, water rad and running the prop pitch up.

on a push button I have engine start and set chocks in.

now the start up is flip 1 switch to forward, press the start switch, then when I get back to it I can pull the switch back to center and I'm ready to go. this should help when I'm scrambling to take off with a bomber inbound.

I also worked on an auto trim function, I have one 3 way switch setup so that when it is in the forward pos the script looks at my joystick Y pos (raw data from the hall effect sensor), and if the joy stick is in a forward or back position over a set amount the software starts issuing trim up or trim down commands until the back or forward pressure is taken off of the stick, I have it setup to check every 400 ms (0.4 sec) and the dead band is adjustable. 

I have tried the auto trim function some and like what I'm seeing so far. this results in more stable dives so that I do not need to fight the trim. the correct trimming on a 109 results in faster airspeed and better turn performance. with this setup I can still override it and add more sooner if I want. but this should keep me close to correct trim at all times.

I will be working on a combat flaps function next, this will be a button that when pressed runs flaps out for a specific amount of time and stops along with a function that when pressed closes the flaps all the way as well as a landing mode that runs the flaps all the way out with the single press of a button.


If anyone is interested let me know and I can help you configure your thrusthmaster product (this should work on any thrustmaster product)


Share this post

Link to post
Share on other sites

I have the same HOTAS and pedals. Show me your ways!

Share this post

Link to post
Share on other sites

so here is my code for the work in progress


include "target.tmh"

//program startup

int main()
    Configure(&HCougar, MODE_EXCLUDED);
    Configure(&T16000, MODE_EXCLUDED);
    Configure(&T16000L, MODE_EXCLUDED);
    Configure(&LMFD, MODE_EXCLUDED);
    Configure(&RMFD, MODE_EXCLUDED);
    Configure(&TFRPRudder, MODE_EXCLUDED);
    Configure(&TWCSThrottle, MODE_EXCLUDED);
    if(Init(&EventHandle)) return 1// declare the event handler, return on error
    //add initialization code here

    MapKey(&Joystick, S2, F5);
    MapKey(&Joystick, H2R, PULSE+RARROW);
    MapKey(&Joystick, H2D, PULSE+DARROW);
    MapKey(&Joystick, H2L, PULSE+LARROW);
    MapKey(&Joystick, H4U, PULSE+UARROW);
    MapKey(&Joystick, H3U, PULSE+'x');
    MapKey(&Joystick, H3D, PULSE+'z');
    MapKey(&Joystick, H3R, CHAIN(DOWN+'z', D(30000), UP+'z')); //30 sec of down flaps (full open)
    MapKey(&Joystick, H3L, CHAIN(DOWN+'x', D(30000), UP+'x')); // 30 sec of close flaps (full close)
    SetSCurve(&Joystick, JOYX, 00000);
    SetSCurve(&Joystick, JOYY, 00000);
    MapKey(&Throttle, SC, F11);
    MapKey(&Throttle, BSF, REXEC(0400
    "if(Joystick[JOYY] > 350) ActKey(PULSE+KEYON+'t'); if(Joystick[JOYY] < -250) ActKey(PULSE+KEYON+'r');")); //auto trim assigned to "BSF" on the Throttle REXEX exicutes and continues to exicute  this untill BSF is released this checks to see if joystick Y axis is > or < than the 350 or -250 up "t" or down "r" trim 
    MapKey(&Throttle, MSU, 't');
    MapKey(&Throttle, MSD, 'r');
    MapKey(&Throttle, MSR, CHAIN(DOWN+'z', D(4000), UP+'z')); //this issues z lower flaps delays for 4000 ms (4sec) and then releases the z key so 4 sec of down flaps
    MapKey(&Throttle, CHF, 'a');
    MapKey(&Throttle, CHB, 'q');
    MapKey(&Throttle, LTB, F6);
    MapKey(&Throttle, EACON, CHAIN( PULSE+'f', D(), PULSE+'s', D(), PULSE+'w', D(), DOWN+UARROW, D(), DOWN+RARROW, D(), PULSE+'p', D(), DOWN+'a')); // Chain() execuites ann within the () D() is a delay between actions, pulse+ is a press and release, DOWN+ holds it down untill Aan UP+ is issued, f = fuel, s = sight, W=int light, 
    MapKey(&Throttle, APENG, CHAIN( PULSE+'i', D(), PULSE+'h')); // i starts engine, h sets the chocks
    MapKey(&Throttle, EACOFF, CHAIN( UP+RARROW, D(), UP+UARROW, D(), UP+'a')); // UARROW is my water rad open, RARROW is mt open oil rad this function stops the opening
    SetSCurve(&Throttle, SCX, 00000);
    SetSCurve(&Throttle, SCY, 00000);
    SetJCurve(&Throttle, THR_RIGHT, 5050);
    SetJCurve(&Throttle, THR_LEFT, 5050);
    SetSCurve(&Throttle, THR_FC, 00000);

//event handler
int EventHandle(int type, alias o, int x)
    DefaultMapping(&o, x);
    //add event handling code here



most of this was created by the GUI that comes with thrustmaster

on the second or 3rd page there is a button to show script, if you get a basic working profile then hit the show script you can copy the code to the scrip editor, this is all programmed in C and then compiled you will then have an option to run your compiled code or the script created by the GUI


so far I have a lot working without much coding

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0