Thrustmaster TQS LED
-
For the sake of clarity, example screenshots for t.a.r.g.e.t. (v3.0.23.608) To sum it up: you need
- a “pulse” event on “press” for BTN17 triggering the “toggle gear” key (or Gear UP and Gear Down repectively), and
- “release” event within the press event on BTN17 per LED to disable the leds on each wheel on UP position (BTN17).
type “press” enables LED, type “release” disables LED. The key command shown in t.a.r.g.e.t. is “LEDx_y(ViperTQS)” where x is the # of LED and y is 0 (led off) or 1 (led on).
To adapt for BTN_36 - Gear Down, “toggle gear” is identical but the LEDs need a type “press” event to light up the corresponding LEDs (1-3 for wheel - multicolor, 19 for Lever, red)
QB_BTN17 is Gear Lever UP, QB_BTN_36 is Gear Lever DOWN:
Event list to let gear lever + front and rear wheels led light up:
Detail for Nose Wheel CTRL Light OFF:
Screenshots are from the mission pack (i.e. button box + Throttle section). If you have purchased them seperately, names may diff.
Of course you may add some “fancy” stuff to the leds by using the “delay” option to first light the front and the right wheel with a delay of 125ms from each other, 75ms later the left wheel and then light up the lever after yet another 700ms.
To do it properly (i.e. having a feedback from Falcon-BMS to the ButtonBox and vicde versa), there needs to be an API of some kind to signal the button box which wheel is lowered (or isn’t lowered in case of a failure). Don’t know if something like this exists. I’m new to this after decades of flightsim abstinence ;).
LED Reference Chart:
HTH -
@r00t Maybe someone can ask the developer of F4toPokeys to make a fork? That little piece of software works like a charm reading BMS shared memory data and lets you map it to pokeys digital outputs. Since the BMS data is already using the correct delays, there’s no need for additional manual coding or workarounds for that.
If you could specify not only a pokeys board but also command the Trustmaster box with it… -
The developer mentioned would need a SDK / API for the TM device to communicate with it. I couldn’t find one on the interwebs,…well,….except this: https://fanatec.com/eu-de/faq/details/id/80 but they aren’t offering it to the world. They want you to get intouch with them and beg for permission to use it.
I‘m not aware if DirectInput may be a way. But even then you‘d have to reverse engineer things without any docs from TM.
I just found some references at Microsoftfor buttons on sticks, throttle axis etc in DirectInput. Maybe the TM devices are accessible via directinput. But even then the functions for buttons and the like must be available as a dedicated target. I have no experience with DirectInput, so I can‘t say if this is an option, tho.
Out of context/offtopic: surprisingly found some API at Thrustmaster…whatever this might be used for… :
https://myapi.thrustmaster.com/ -
-
All,
I just attempted to install TARGET on a new WIN 11 PC, and 8 of the drivers refused to install due to Win 11 Core Security. Anyone else see this issue on Win 11? If so, what did you do (I.e…did you turn off Core Security and install TARGET, or just uninstall TARGET)? Anyone hear if the update Thrustmaster is doing for LEDs in TARGET will also include making their drivers Windows compliant?
Regards,
Tomcattwo
(VoiceClone) -
@Tomcattwo https://www.reddit.com/r/hotas/comments/tsi9rp/comment/i2role3/ did exactly this. But I‘d contact TM support regardless. They should feel your pain especially because Win11 is listed as compatible for the drivers package but not for T.A.R.G.E.T, the latter one needed to get some of the features you can’t get otherwise
-
@r00t
Thanks for the reply and link. I have opened a case with Thrustmaster.Installed all my hardware yesterday, including my 23-year old Cougar stick (with VFS SE upgrade), brand-new Viper TQS with mission Pack, 2 x TM F-16 MFDs, SimGears ICP, and a DEDuino Arduino Unofficial based FFI+DED. All the hardware and their drivers work fine and all devices are recognized. So, TM.did.udate hardware drivers to work.with Win 11 (and.the.downloads do.say.Win 11 supported). It is just T.A.R.G.E.T. software (where the latest download from TM that says Win 10 supported, but does not say Win 11 supported yet) that is not allowed by Core Isolation to be installed.
In the thread you sent, looks like the OP on the Reddit thread had Target installed on Win 11 before the (mandatory) upgrade to 22HXX version of Win 11, where Core Isolation was introduced, and it monkey’ed up his hardware drivers for MFDs (and perhaps more).
I already fought the fight turning off Core Isolation for a Logitech Gaming Software install, that didn’t work, then couldn’t turn Core Isolation back on until I manually hunted down all 'forbidden" drivers and deleted them (the LGS uninstall left a whole bunch of remnants). It was a PITA I do not care to go through again with T.A.R.G.E.T. and risk undoing my hardware drivers or messing with the registry.
So, if you don’t mind this question, did you turn Core Isolation off in order to run T.A.R.G.E.T.?
Regards,
Tomcattwo
(VoiceClone) -
@Tomcattwo no Win11 here, never will be in the foreseeable future. My Xeon CPU based MacPro running Windows 10 does not meet MS „requirements“ to run Win11. Can‘t help you with that as long as they insist on complying with their….ermmmm……“standards“….
-
I did receive a reply to my Technical case. See this thread for details.
<TLDR>: I received info from Thrustmaster (see below) that TARGET software is incompatible with Win 11 Core Security and will not likely be updated to be compliant for Win 11 in the future. As far as I know, TARGET is the only way to program the LEDs for the Viper TQS Button Box. A $500 piece of kit cannot be made fully functional in Win 11 without disabling Win 11 Core Security, and TM does not seem inclined to fix it. Those of you contemplating purchase of a Viper TQS with Button Box and whose OS is Win 11 should consider this before purchasing. </TLDR>
Regards,
Tomcattwo
(VoiceClone) -
Hey,
I’ve mapped the TQS LED with TARGET v3.0.23.608 (and Windows 11) :
- Gear Up/Down
- TWA buttons
You can try this sample profile (light) :
Just run TAGERT GUI / Run configuration (from the desktop without BMS) : https://drive.google.com/file/d/1EFBhPFH2jVWmZKSbBqtKeFA2loBJWXh_/view?usp=sharingYou should see the gear lights and TWA buttons come alive.
Hope it will help
-
@benco
Nice, Benco. Do the gear lights react on position of the lollipop or are they just on all the time?
R/
TC2 -
@Tomcattwo lights are linked with the lollypop position. (In my case)
-
I fiddled around with the Thrustmaster Script Editor today. First things first: The script editor is able to do stuff I wasn’t able to achive in the T.A.R.G.E.T GUI
One simple task I as an example:
Enable several LEDs on 1st press of button “A” and disable all of them on 2nd press of button “A”. The TWA: POWER BTN (Alt Numpad 0) would need exactly that. This wasn’t doable in the GUI. I had success with programming it in the script editor.Quick and dirty (just to outline excactly the task enable all TWA LEDs with the 1st press of TWA POWER BTN and disable them with the 2nd press of that button (if you bought the Viper Button Box standalone, You must swap ViperTQS with ViperBBox below:
include "target.tmh" int main() { Configure(&HCougar, MODE_EXCLUDED); Configure(&JoystickF18, MODE_EXCLUDED); Configure(&Throttle, MODE_EXCLUDED); Configure(&A320Pilot, MODE_EXCLUDED); Configure(&A320Copilot, MODE_EXCLUDED); Configure(&TCAQuadrant12, MODE_EXCLUDED); Configure(&TCAQuadrant34, MODE_EXCLUDED); Configure(&TCAYokeBoeing, MODE_EXCLUDED); Configure(&TCAQBoeing12, MODE_EXCLUDED); Configure(&TCAQBoeing34, MODE_EXCLUDED); Configure(&TCASidestickXPilot, MODE_EXCLUDED); Configure(&TCASidestickXCopilot, MODE_EXCLUDED); Configure(&ViperBBox, MODE_EXCLUDED); Configure(&T16000, MODE_EXCLUDED); Configure(&T16000L, MODE_EXCLUDED); Configure(&LMFD, MODE_EXCLUDED); Configure(&RMFD, MODE_EXCLUDED); Configure(&ViperTQS, MODE_KEEPENABLED); Configure(&Joystick, MODE_EXCLUDED); Configure(&TFRPRudder, MODE_EXCLUDED); Configure(&TWCSThrottle, MODE_EXCLUDED); Configure(&TFRPHARudder, MODE_EXCLUDED); if(Init(&EventHandle)) return 1; SetKBRate(32, 50); SetKBLayout(KB_GER); SetShiftButton(0, 0, 0, 0, 0, 0); MapAxis(&Joystick, JOYX, DX_X_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&Joystick, JOYX, 0, 0, 0, 0, 0); MapAxis(&Joystick, JOYY, DX_Y_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&Joystick, JOYY, 0, 0, 0, 0, 0); MapKey(&ViperTQS, QB_BTN16, SEQ( CHAIN( LEDV(&ViperTQS, 18, 1), D(), LEDV(&ViperTQS, 14, 1), D(), LEDV(&ViperTQS, 15, 1), D(), LEDV(&ViperTQS, 16, 1)), CHAIN( LEDV(&ViperTQS, 18, 0), D(), LEDV(&ViperTQS, 14, 0), D(), LEDV(&ViperTQS, 15, 0), D(), LEDV(&ViperTQS, 16, 0)))); MapAxis(&ViperTQS, VQ1_AXIS, DX_XROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&ViperTQS, VQ1_AXIS, 0, 0, 0, 0, 0); MapAxis(&ViperTQS, VQ2_AXIS, DX_YROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&ViperTQS, VQ2_AXIS, 0, 0, 0, 0, 0); MapAxis(&ViperTQS, VQ3_AXIS, DX_X_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&ViperTQS, VQ3_AXIS, 0, 0, 0, 0, 0); MapAxis(&ViperTQS, VQ4_AXIS, DX_Y_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&ViperTQS, VQ4_AXIS, 0, 0, 0, 0, 0); MapAxis(&ViperTQS, VQ5_AXIS, DX_Z_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&ViperTQS, VQ5_AXIS, 0, 0, 0, 0, 0); MapAxis(&ViperTQS, VB1_AXIS, DX_ZROT_AXIS, AXIS_NORMAL, MAP_ABSOLUTE); SetSCurve(&ViperTQS, VB1_AXIS, 0, 0, 0, 0, 0); } int EventHandle(int type, alias o, int x) { DefaultMapping(&o, x); }
Ignore the Throttle Axis settings etc. It’s just a demo for the four buttons. Docs for the Script Editor: https://ts.thrustmaster.com/download/accessories/pc/hotas/software/TARGET/TARGET_Script_Editor_Basics_v1.5_ENG.pdf
If you want to give it a shot: open the TM T.A.R.G.E.T. Script Editor, select menu > new > “target code *.tmc”, Copy and Paste the code snippet above and click “run”:
Yet another bonus when using the script editor environment to configure the devices: you are able to exclude their DX buttons from being merged into the virtual controller when running your scripts. I wasn’t able to do that in the GUI either. Pay attention to the MODE_KEEPENABLED above:
Configure(&ViperTQS, MODE_KEEPENABLED);
My TQS is excluded from merging but available as a programmable interface in the editor wihtout changing any of the DX mappings on the device. If you don’t use MODE_KEEPENABLED, th DX button mappings change and limits # of DX keys and you need to programm every key on your own. With MODE_KEEPENABLED it works just like target isn’t running and preserves the DX button IDs you already know.
I excluded my Warthog Flightstick completetly (and my two MFDs) on purpose with keyword MODE_EXCLUDED, because there is nothing to programm there. This results in the following thrustmaster joystick panel view
when the script is started. Will experiment with it in the next days. Ideas welcome.
-
@r00t
Is the TM Script Editor a part of T.A.R.G.E.T. software or can it be accessed separately (i.e. without having TARGET software installed)?
Thanks,
R/
TC2 -
It’s also possible for the script to read files. So that means if the state of BMS or other sims can be live exported to a file, you can then set the LEDs as per the actual state of the simulator. For example the gear indicators and AUX threat warning LEDs.
Look in sys.tmh for the function definitions such as fopen, fread, fgetc, strcmp etc.
-
@Tomcattwo it‘s part of the T.A.R.G.E.T Software installation. The script editor is a separate executable that should be available as a dedicated shortcut in your startmenu, like the control panel and the GUi.
You can’t run the GUi and the Script Editor at the same time. You can’t import scripts into the GUI. But you could use „view script“ in the GUI, copy the contents into the clipboard, close GUI, open the script editor and paste the script contents into a new file as a starting point of a possibly existing configuration.
The editor is a bit limited in terms of syntax highlighting and other functions you are used to in your „favorite editor“. But it has a completion feature which be helpful when one starts his adventure there. But as it’s „plain text“, you could edit yo stuff in sublime, vim, notepad++ or even visual studio and copy it over later on. Header files with relevant definitions are available also.
The term „script“ is a bit misleading, tho. It‘s actually more or less a limited set of C. Your code gets compiled by the „editor“ and results in a dll that seems to get loaded. Haven’t figured out if it’s possible to check for return values of processes that are run by the build-in „spawn“ (basically this executes a arbitrary executable). But it seems like you can create your own functions with conditionals, loops, operators and keywords. Refer to page 41ff.
-
@r00t said in Thrustmaster TQS LED:
My TQS is excluded from merging but available as a programmable interface in the editor wihtout changing any of the DX mappings on the device. If you don’t use MODE_KEEPENABLED, th DX button mappings change and limits # of DX keys and you need to programm every key on your own. With MODE_KEEPENABLED it works just like target isn’t running and preserves the DX button IDs you already know.
Thanks for this. This is a game changer for me as I prefer to use the game/simulation to map buttons and axis to game functions.
This will make the scripting far simpler so that I can focus on just controlling the LED from game output. Not that I really need to as I am a VR flyer only but I am a software system engineer so I like to dabble.
-
@scubapics , @r00t ,
Reading thru the TARGET Scripting language basic .pdf last night and it alludes to being able to use C to allow interface with other programs. The crown jewel would be to find a way to connect TM devices using TARGET scripting language to pull info from F4SharedMem.dll to use in lighting LEDs. Could it be as simple as a short inline C program to include F4SharedMem.DLL and pass gamestate info to Target.h (or another Target Module). I say simple, but not for me - my C programming skills are far below what would be required. This seems similar to what others have done for Arduino boards with such interface software as DEDUino or BMSAIT.What do you think? If such a module existed, I would seriously consider turning off Win 11 Core memory integrity to install TARGET software.
And I agree.it is great to be able to exclude Viper DX Button and Axis assignment from TARGET and just stick with LED programming with TARGET using BMS AL for button and axis assignment to keep it properly organized and responding in BMS.
Regards,
Tomcattwo -
@Tomcattwo said in Thrustmaster TQS LED:
@scubapics , @r00t ,
Reading thru the TARGET Scripting language basic .pdf last night and it alludes to being able to use C to allow interface with other programs. The crown jewel would be to find a way to connect TM devices using TARGET scripting language to pull info from F4SharedMem.dll to use in lighting LEDs. Could it be as simple as a short inline C program to include F4SharedMem.DLL and pass gamestate info to Target.h (or another Target Module). I say simple, but not for me - my C programming skills are far below what would be required. This seems similar to what others have done for Arduino boards with such interface software as DEDUino or BMSAIT.What do you think? If such a module existed, I would seriously consider turning off Win 11 Core memory integrity to install TARGET software.
And I agree.it is great to be able to exclude Viper DX Button and Axis assignment from TARGET and just stick with LED programming with TARGET using BMS AL for button and axis assignment to keep it properly organized and responding in BMS.
Regards,
TomcattwoWe have no control over the compiler so I don’t think there is a way to load other DLLs. The way to do it may be to write another application that can uses F4SharedMem.dll and generate text files that are updated live. Then use a target script to read the file and pull in the information to set the LEDs.
-
@Tomcattwo haven‘t seen any code that does this with target yet. The code I found digging into this did only trigger LEDs depending on button states and press / release cycles without acting on real sim data. But that doesn’t mean much. Just did a short research on GitHub.
Plenty of very talented people here. IMO there are many ways to solve this, directly reading shm, calling an external api toy with arguments and react on return codes (that’s why I mentioned „spawn“)…
My C-foo is very basic too, but it‘s an interesting challenge. That said, my first step is to get TWA react on pressing buttons like it does in the sim. Usually someone with much better programming skills pops up and takes the challenge. I‘d say, @scubapics sounds like he knows how to implement a skeleton or even a proto that has some bells and whistles
-
@scubapics said in Thrustmaster TQS LED:
@r00t said in Thrustmaster TQS LED:
MODE_KEEPENABLED it works just like target isn’t running and preserves the DX button IDs you already know.
Thanks for this. This is a game changer for me as I prefer to use the game/simulation to map buttons and axis to game functions.
This will make the scripting far simpler so that I can focus on just controlling the LED from game output. Not that I really need to as I am a VR flyer only but I am a software system engineer so I like to dabble.
Headers contained a third mode called MODE_FILTERED, no idea what it is actually doing.