Jump to content

DCS2TARGET: DCS to Thrustmaster HOTAS LED Controller (Viper Mission Pack, Viper Panel and Warthog)


slughead

Recommended Posts

What Is DCS2TARGET?

With the recent release of the new Thrustmaster Viper Mission Pack and Viper Panel, many users have shared their dismay that the landing gear and other indicators are not working/integrated with DCS. This isn't a fault of the product or Thrustmaster as there are far too many applications, each with their unique style of exposing simulation data. It isn't fair to expect Thrustmaster to support all of those applications and this is where the community fills the gap.

Along with TMHotasLEDSync, you will also need dcs2target. Together, they enable the LEDs on the Viper Mission Pack, Viper Panel and the Warthog to relay the indicators in the cockpits of DCS. There is a caveat though as I will explain below.

For the Viper Mission Pack and Viper Panel, some LEDs can be used to relay the indicators of the F-16 landing gear, the landing gear handle and the threat warning auxiliary panel. It also has two columns of five user-programmable LEDs. However, the LEDs in the threat warning auxiliary switches do not fully mimic those of the real aircraft. Specifically, the "altitude" switch can either be illuminated red or green on the Viper Mission Pack / Panel as opposed to "LOW" in amber and "ALT" in green. Also, the ACT/PWR switch can only be illuminated fully as opposed to individually for "S" and "POWER". Therefore we have to accept some compromises in how the indicators of the F-16 can be shown on the Viper Mission Pack / Panel.

For the Warthog there is only a column of five LEDs for the user to configure.

 

How It Works:

The dcs2target.zip file contains a set of lua files that interrogates DCS and sends the relevant lamp data to the Thrustmaster TARGET software that is running the TMHotasLEDSync.tmc script. The data is sent via TCP and only if the data changes. The TARGET script handles each packet through an event. Thus it is fairly efficient and should not introduce any significant load on your CPU.

The DCS simulation data is interrogated every 100ms (that’s ten times a second). It’s not too taxing on the system yet fast enough so that we humans shouldn’t notice any lag.

The TARGET script does not configure your HOTAS throttle for use with DCS. It merely controls the LEDs of the HOTAS throttle. If you use another TARGET script to map your device to DCS, I advise you to use DCS to map the axis, buttons and switches instead. However, if you wish to use a target script to map your HOTAS throttle to DCS, you’ll have to try to figure out how to combine this script with yours. Please don’t ask me to help with combining scripts, you’re going to have to figure that out on your own.

 

Installation:

The dcs2target.zip file contains two folders: Hooks and dcs2target. Extract the folders and save them in the "%HOMEPATH%\Saved Games\DCS\Scripts" or "%HOMEPATH%\Saved Games\DCS.openbeta\Scripts" folder or both if you use both stable and open beta builds.

Your "%HOMEPATH%\Saved Games\DCS\Scripts" and "%HOMEPATH%\Saved Games\DCS.openbeta\Scripts" folders should now have two folders:

  1. Hooks
  2. dcs2export

Unzip the TMHotasLEDSync.zip file to a folder of your choosing.

 

Links to Files (GitHub Repositories):

 

Current Build Versions:

TMHotasLEDSync.zip 1.0.4
dcs2target.zip 1.0.8

 

How To Use:

  1. Start the Thrustmaster T.A.R.G.E.T. script editor.
  2. Open the TMHotasLEDSync.tmc script from the folder where you extracted TMHotasLEDSync.zip.
  3. Start the script.
  4. Start DCS.

 

Supported Aircraft:

The following aircraft are currently supported:

Aircraft Exported Parameters Supported TM Hotas Throttle
A-10C Speed brake position and console lighting. Warthog
A-10C_2 Speed brake position and console lighting. Warthog
F-16 Gear, gear handle, TWA indications and the speed brake position. Viper Mission Pack, Viper Panel
FA-18_Hornet Speed brake position and console lighting. Warthog
JF-17 Gear, gear warning, gear transit, master warning and the speed brake position. Viper Mission Pack, Viper Panel
Su-25T Speed brake position. Warthog
Su-33 Speed brake position. Warthog

I expect to support other aircraft such as the F-15 and F-14 as and when I purchase them. You are welcome to contribute to the project by adding to the scripts through the GitHub projects.

 

Suggestions And Feature Requests:

Feel free to make any suggestions for improvements as a comment below.

 

Need Help?

In the first instance, ensure you have installed the v3.0.23.1003 or later of the Thrustmaster TARGET software. Most problems are due to people running old versions of the Thrustmaster TARGET software. If that doesn't solve your problem, raise an issue in the comments below. Be sure to include your dcs.log and full TARGET script editor console output in your message (you can select, copy and paste directly from the TARGET console output using your mouse).

 

Contributors:


Edited by slughead
Added support for JF-17.
  • Like 6
Link to comment
Share on other sites

Update...

Fixed:

  1. Now working with multiplayer.
  2. Detects when aircraft is destroyed - LED states on the ViperTQS will be set to OFF.
  3. Script race conditions that cause the scripts to fail (crash).
  4. Removed FarmStick detection from TARGET script.
  5. Fixed case where the sync with the ViperTQS would not work if the mission does not start in a jet.

 

Updated files are in the first post.


Edited by slughead
  • Like 1
Link to comment
Share on other sites

Feature Requests

ViperTQS Specific:

Two Columns of LEDs:

  1. Speed brake - show the amount brake is open/closed
  2. Radar/Missile alert:
    1. Radar lock - all LEDs lit.
    2. Missile launch detected - all LEDs flash.

Warthog Specific:

Column of Five LEDs:

  1. Speed brake - show the amount brake is open/closed
  2. Gear:
    1. Gear Up - bottom four LEDs illuminated
    2. Gear down - bottom four LEDs off
    3. Gear warning - top LED flashing

 

I can’t think of a way to allow more than one of the above. I also do not feel it worthy to reproduce indications that are already visible in the cockpit and/or have audible alerts.

The speed brake is probably the most sensible one to implement in my opinion.

I would also like to link the brightness of the backlight to the actual aircraft control. This may be possible on the Warthog but I am not aware of a way to do this on the ViperTQS.

Please discuss/throw your ideas into the pot.

  • Like 1
Link to comment
Share on other sites

Update:

The speedbrake position is now indicated on the left column of the programmable LEDs display.

The updated links to the files are in the first post. Both files are required.

Link to comment
Share on other sites

Hey Slug

Did every thing you said but it dosent work.. No lights...

1. I Unzipped the filed in the Saved Games\DCS.openbeta\Scripts folder ( put excisting folders at a temp folder not to mix )

2. Run the ViperTQSLEDSync.tmc on TARGET SCRIPT EDITOR but no lights happen... glad if you can help

 

yossi7385@gmail.com it will be a huge help   

Link to comment
Share on other sites

11 minutes ago, yosson76 said:

Hey Slug

Did every thing you said but it dosent work.. No lights...

1. I Unzipped the filed in the Saved Games\DCS.openbeta\Scripts folder ( put excisting folders at a temp folder not to mix )

2. Run the ViperTQSLEDSync.tmc on TARGET SCRIPT EDITOR but no lights happen... glad if you can help

 

yossi7385@gmail.com it will be a huge help   

Can you provide the dcs.log and the output from the console window of the script editor please?

What aircraft are you flying? Only the F-16 is currently supported.


Edited by slughead
Link to comment
Share on other sites

flying the f16 only

dcs.log

Running script: C:\Users\Admin\Downloads\temp\DCS\TQS\ViperTQSLEDSync.tmc
Compile Succeeded.
*** Allocated ProcInstances found from the previous run: use FreeProcInstance() *** 
Mapped plugin module "C:\Program Files (x86)\Thrustmaster\TARGET\Plugins\sys.dll"
Physical USB HID devices managed by script!
Currently plugged USB HID devices[3]:
1: "F16 MFD 2" - "USB\VID_044F&PID_B352&REV_0100"
2: "Viper Panel" - "USB\VID_044F&PID_0413&REV_0200"
3: "F16 MFD 1" - "USB\VID_044F&PID_B351&REV_0100"
USB HID device with hardware id "VID_044F&PID_0412" cannot be found
Virtual HID devices managed by script!
Connecting virtual joystick...Done
Device name set to Thrustmaster Combined
Connecting virtual keyboard...Done
Connecting virtual mouse (absolute axes)...Done
Server socket listening on TCP port 2323 

main returned 0

  

 

dcs.log

Link to comment
Share on other sites

36 minutes ago, yosson76 said:

2: "Viper Panel" - "USB\VID_044F&PID_0413&REV_0200"

There's the reason. The Viper Panel is not supported in the build that you are using. Within the hour, I will upload a new version that should support the Viper Panel and the Warthog plus other aircraft. I say should because I do not have a Viper Panel to test with. You will be my guinea pig.

Link to comment
Share on other sites

  • slughead changed the title to DCS to Thrustmaster HOTAS LED Controller (Viper Mission Pack, Viper Panel and Warthog)

Update!

The tool has been renamed to DCS2TargetExport. Why? Well, it now supports the Warthog as well as the Viper Mission Pack... and now the Viper Panel too - or at least I hope it works for the Viper Panel.

Wait, there's more.... it also supports many more aircraft. Er, but don't get your hopes up. The F-16 indicators are only shown in the Viper Mission Pack / Panel. Other supported aircraft only show the speed brake position on the Warthog.

I'm open to alternative suggestions for the Warthog LEDs and those of the Viper Mission Pack / Panel. Please put your suggestions in a comment below.

The links to the updated files are in the first post which has also been edited to show the new features and limitations.

Enjoy!

The next update will support control of the Warthog backlight level from the relevant cockpit control.

  • Like 1
Link to comment
Share on other sites

4 hours ago, yosson76 said:

HEY, Trying again this morning, still not working.. thanks for the effort

BTW.. I do manage to make my own with the TARGET GUI but it forces me to use the Virual binding

 

If you want me to investigate, I need the DCS.log and the target console output. Select all the text in the console with your mouse, paste it into a text file and send that.

Link to comment
Share on other sites

4 hours ago, Upload4u said:

I fly only the F16....and it doesn`t work---any help please`?Screenshot 2023-11-25 073659.png

dcs.logUnavailable

The line with "Error: (internal)" is a fault between TARGET and the device. That's not something I have caused or can fix. It is an internal TARGET fault. Which version of the TARGET script editor have you installed? You may find using the latest version solves your problem. It should be v3.0.23.1003.

Link to comment
Share on other sites

HEY Slug, god evening

attached:

1. target console output

Running script: C:\Users\Admin\Downloads\temp\DCS\TQS\TMHotasLEDSync.tmc
*** Allocated ProcInstances found from the previous run: use FreeProcInstance() *** 
Mapped plugin module "C:\Program Files (x86)\Thrustmaster\TARGET\Plugins\sys.dll"
Compile Succeeded.
Physical USB HID devices managed by script!
Currently plugged USB HID devices[3]:
1: "F16 MFD 2" - "USB\VID_044F&PID_B352&REV_0100"
2: "Viper Panel" - "USB\VID_044F&PID_0413&REV_0200"
3: "F16 MFD 1" - "USB\VID_044F&PID_B351&REV_0100"
USB HID device with hardware id "VID_044F&PID_0404" cannot be found
USB HID device with hardware id "VID_044F&PID_0412" cannot be found
USB HID device "Viper Panel"(USB\VID_044F&PID_0413\3667324B3530) selected
Virtual HID devices managed by script!
Connecting virtual joystick...Done
Device name set to Thrustmaster Combined
Connecting virtual keyboard...Done
Connecting virtual mouse (absolute axes)...Done
Server socket listening on TCP port 2323 

main returned 0
Script stopped!

 

2. DCS.Log


dcs.log

Huge thanks for your efforts

Link to comment
Share on other sites

22 minutes ago, yosson76 said:

HEY Slug, god evening

attached:

1. target console output

Running script: C:\Users\Admin\Downloads\temp\DCS\TQS\TMHotasLEDSync.tmc
*** Allocated ProcInstances found from the previous run: use FreeProcInstance() *** 
Mapped plugin module "C:\Program Files (x86)\Thrustmaster\TARGET\Plugins\sys.dll"
Compile Succeeded.
Physical USB HID devices managed by script!
Currently plugged USB HID devices[3]:
1: "F16 MFD 2" - "USB\VID_044F&PID_B352&REV_0100"
2: "Viper Panel" - "USB\VID_044F&PID_0413&REV_0200"
3: "F16 MFD 1" - "USB\VID_044F&PID_B351&REV_0100"
USB HID device with hardware id "VID_044F&PID_0404" cannot be found
USB HID device with hardware id "VID_044F&PID_0412" cannot be found
USB HID device "Viper Panel"(USB\VID_044F&PID_0413\3667324B3530) selected
Virtual HID devices managed by script!
Connecting virtual joystick...Done
Device name set to Thrustmaster Combined
Connecting virtual keyboard...Done
Connecting virtual mouse (absolute axes)...Done
Server socket listening on TCP port 2323 

main returned 0
Script stopped!

 

2. DCS.Log


dcs.log 119.65 kB · 1 download

Huge thanks for your efforts

Try this, please.

Export.lua

Link to comment
Share on other sites

10 hours ago, Upload4u said:

I fly only the F16....and it doesn`t work---any help please`?Screenshot 2023-11-25 073659.png

dcs.log 104.01 kB · 3 downloads

Can you also try this export.lua file, please?

Export.lua

Link to comment
Share on other sites

@yosson76, @Upload4u My apologies. There were two bugs and I fixed just one. Please try this export.lua file. Don't forget to provide your dcs.log file if you have any further problems.

Export.lua


Edited by slughead
Link to comment
Share on other sites

  • slughead changed the title to DCS2TARGET: DCS to Thrustmaster HOTAS LED Controller (Viper Mission Pack, Viper Panel and Warthog)
28 minutes ago, yosson76 said:

FINELLY.... OMG IT WORKS...

Thanks for not giving up ... the wheels works perfect.. thanks

cant wait for more updates for other mod's like the F18 and F15E .. Thanks mate

 

Sweet! The F-18 is currently supported on the Warthog only. I didn't intend to export F-18 data to the Viper Mission Pack / Panel as, well, it's not a Viper which is a single-engine aircraft. The Warthog is better suited for the F-18. Similarly for the F-15. I could be persuaded if there is enough interest. Ideally, it would be nice if Thrustmaster produced F-18 and F-15 specific throttles. Better still, a generic twin-engine throttle which has interchangeable throttle handles just as they did for the interchangeable F-16 and F-18 stick grips.


Edited by slughead
Link to comment
Share on other sites

Update!

The backlight of the Warthog HOTAS for the A-10C and A-10C II can now be controlled from the Console Lighting dial in the A-10C / A-10C II cockpit. It realistically mimics the state of the electric system in that either the APU must be running at 100% RPM along with the APU GEN PWR set to the on position or the left engine must be at 50% RPM or higher.

Be aware that the Warthog throttle has only six levels of intensity with level 0 being off.

I will endeavour to add the same functionality to the FA-18 Hornet in due course.

The updated files are linked in the first post.

Enjoy!

Link to comment
Share on other sites

Update!

DCS2Target has been rewritten to use the DCS "Hooks" method of accessing simulation data. What is the benefit of the "hooks" method? Hooks allows multiple mods or third-party scripts to run alongside each other without any interference. It's simply plug-and-play!

Updated installation instructions and links to the new dcs2target.zip file in the first post. Be sure to remove the export.lua and associated DCS2TARGET lua files of the old release from your Saved Games Scripts folder before running DCS!

Link to comment
Share on other sites

5 hours ago, NineLine said:

Great work on this, I am talking with Thrustmaster and I am hoping to work with them and our team to get this more built-in. I hope you don't mind if I pick your brain here and there if needed. Thanks!

Feel free. I'm happy to help where I can. Thrustmaster contacted me about a collaboration last Friday but haven't heard from them since.

  • Like 1
Link to comment
Share on other sites

  • Recently Browsing   0 members

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