Jump to content

Scripts for Thrustmaster Warthog LEDs?


imacken
 Share

Recommended Posts

Does anyone have a script for the LEDs on a Warthog HOTAS? I just can't make any sense of how to do this in TARGET!

I would really like the 5 LEDs to vary with the throttle, or to come on with things like landing gear, flaps, etc.

Intel i9 10900K 5.2GHz · MSI Gaming X Trio RTX 3090 · ASUS ROG STRIX Z590-F Wi-Fi · Acer 4K 32" XB321HK · Samsung 970 500Gb M.2 NVMe · 2 x Samsung 850 Evo 1Tb · 2Tb HDD · 32Gb Corsair Vengance 3000MHz DDR4 · Windows 11 · Thrustmaster TPR Pedals · TrackIR5 · Thrustmaster F/A-18 Hornet Grip · Virpil WarBRD Base · Virpil Throttle MT-50 CM3 · Virpil Alpha Grip · Virpil Control Panel 2 · Thrustmaster F-16 MFDs · HTC Vive Pro 2

Link to comment
Share on other sites

// Defines for LED-Status on Throttle
    int TLED1on  = LED(&Throttle, LED_ONOFF, LED_CURRENT+LED1);
    int TLED1off = LED(&Throttle, LED_ONOFF, LED_CURRENT-LED1);
    int TLED2on  = LED(&Throttle, LED_ONOFF, LED_CURRENT+LED2);
    int TLED2off = LED(&Throttle, LED_ONOFF, LED_CURRENT-LED2);
    int TLED3on  = LED(&Throttle, LED_ONOFF, LED_CURRENT+LED3);
    int TLED3off = LED(&Throttle, LED_ONOFF, LED_CURRENT-LED3);
    int TLED4on  = LED(&Throttle, LED_ONOFF, LED_CURRENT+LED4);
    int TLED4off = LED(&Throttle, LED_ONOFF, LED_CURRENT-LED4);
    int TLED5on  = LED(&Throttle, LED_ONOFF, LED_CURRENT+LED5);
    int TLED5off = LED(&Throttle, LED_ONOFF, LED_CURRENT-LED5);

// Dim Throttle Backlight
    int TBLoff = LED(&Throttle, LED_INTENSITY, 0);
    int TBLon  = LED(&Throttle, LED_INTENSITY, 50);

 

Working with them:

MapKeyIO(&Throttle, LDGH, EJECT, CHAIN(Canopy_toggle, SEQ(TLED1on, TLED1off));

 

Or switching all LEDs off, when throttle is behind the backward detent:

// Idle Cutoff Code
    MapKey(&Throttle,  IDLELON, CHAIN(EXEC("TrimDXAxis(DX_ZROT_AXIS, 90);"), TBLoff));
    MapKeyR(&Throttle, IDLELON, CHAIN(EXEC("TrimDXAxis(DX_ZROT_AXIS, SET(0));"), TBLon));

 

The fragments possibly need to be tuned for your setup, but gererally they should work. :thumbup:

 

If not, don't hesitate to blame me. ;)

Link to comment
Share on other sites

Here's some more that change the LED's when certain switches are set. Including dimming and turning them all off completely

 

MapKey(&Throttle, EACON, LED(&Throttle, LED_INTENSITY, 43));

MapKey(&Throttle, EACOFF, LED(&Throttle, LED_INTENSITY, 0));

MapKey(&Throttle, APPAT, LED(&Throttle, LED_ONOFF, LED_CURRENT+LED1));

MapKeyR(&Throttle, APPAT, LED(&Throttle, LED_ONOFF, LED_CURRENT-LED1));

 

MapKey(&Throttle, APAH, LED(&Throttle, LED_ONOFF, LED_CURRENT+LED2));

MapKeyR(&Throttle, APAH, LED(&Throttle, LED_ONOFF, LED_CURRENT-LED2));

MapKey(&Throttle, APALT, LED(&Throttle, LED_ONOFF, LED_CURRENT+LED3));

MapKeyR(&Throttle, APALT, LED(&Throttle, LED_ONOFF, LED_CURRENT-LED3));

Link to comment
Share on other sites

Guys, thanks a lot for that. If only I knew what to do with that code!

Do they get placed into a fcf file somewhere? Sorry about my total ignorance of TARGET. I did look through the manual and got a general view and can make a standard profile OK, but inserting your code? Hmmm....

Intel i9 10900K 5.2GHz · MSI Gaming X Trio RTX 3090 · ASUS ROG STRIX Z590-F Wi-Fi · Acer 4K 32" XB321HK · Samsung 970 500Gb M.2 NVMe · 2 x Samsung 850 Evo 1Tb · 2Tb HDD · 32Gb Corsair Vengance 3000MHz DDR4 · Windows 11 · Thrustmaster TPR Pedals · TrackIR5 · Thrustmaster F/A-18 Hornet Grip · Virpil WarBRD Base · Virpil Throttle MT-50 CM3 · Virpil Alpha Grip · Virpil Control Panel 2 · Thrustmaster F-16 MFDs · HTC Vive Pro 2

Link to comment
Share on other sites

Thanks but I am no further forward!

Can someone please give me a little guide to how to use the code posted above?

Intel i9 10900K 5.2GHz · MSI Gaming X Trio RTX 3090 · ASUS ROG STRIX Z590-F Wi-Fi · Acer 4K 32" XB321HK · Samsung 970 500Gb M.2 NVMe · 2 x Samsung 850 Evo 1Tb · 2Tb HDD · 32Gb Corsair Vengance 3000MHz DDR4 · Windows 11 · Thrustmaster TPR Pedals · TrackIR5 · Thrustmaster F/A-18 Hornet Grip · Virpil WarBRD Base · Virpil Throttle MT-50 CM3 · Virpil Alpha Grip · Virpil Control Panel 2 · Thrustmaster F-16 MFDs · HTC Vive Pro 2

Link to comment
Share on other sites

To use that code, you need to use the script editor instead of the GUI. If you have already created stuff in the GUI, there is a trick to getting your code into the script editor.

 

When you run an fcf file from the GUI, Target actually creates a script file *.tmc and buries it in the Windows file system. I don't have my sim pit running, so I can't point you to the folder they are in, but if you do a search on your C: drive for tmc files, you will find it.

 

Once you have the script file just open it with the script editor and paste the code in, below the header lines.

 

The one thing I can add is that code created from the fcf files is very cluttered. It could be much more compact if you wrote it yourself, leaving out the extraneous stuff.

 

I highly recommend giving the editor manual a read. It is far less daunting than it might look, at first glance.

 

NOTE: Everyone is different. I, personally, thoroughly enjoy creating scripts in Target. :D


Edited by cichlidfan

ASUS ROG Maximus VIII Hero, i7-6700K, Noctua NH-D14 Cooler, Crucial 32GB DDR4 2133, Samsung 950 Pro NVMe 256GB, Samsung EVO 250GB & 500GB SSD, 2TB Caviar Black, Zotac GTX 1080 AMP! Extreme 8GB, Corsair HX1000i, Phillips BDM4065UC 40" 4k monitor, VX2258 TouchScreen, TIR 5 w/ProClip, TM Warthog, VKB Gladiator Pro, Saitek X56, et. al., MFG Crosswind Pedals #1199, VolairSim Pit, Rift CV1 :thumbup:

Link to comment
Share on other sites

Thanks a lot. I tried what you suggested, but the script editor wouldn't 'see' the tmc file in Roaming/....

I tried just pasting the code into the script editor, but nothing seemed to work.

I'm going away for a few days, but I'll try to see what is going on here when I get back. Still very confused by the whole TARGET thing!

Intel i9 10900K 5.2GHz · MSI Gaming X Trio RTX 3090 · ASUS ROG STRIX Z590-F Wi-Fi · Acer 4K 32" XB321HK · Samsung 970 500Gb M.2 NVMe · 2 x Samsung 850 Evo 1Tb · 2Tb HDD · 32Gb Corsair Vengance 3000MHz DDR4 · Windows 11 · Thrustmaster TPR Pedals · TrackIR5 · Thrustmaster F/A-18 Hornet Grip · Virpil WarBRD Base · Virpil Throttle MT-50 CM3 · Virpil Alpha Grip · Virpil Control Panel 2 · Thrustmaster F-16 MFDs · HTC Vive Pro 2

Link to comment
Share on other sites

When you get back, if you still can't sort it, send me a PM. We will get it going.

ASUS ROG Maximus VIII Hero, i7-6700K, Noctua NH-D14 Cooler, Crucial 32GB DDR4 2133, Samsung 950 Pro NVMe 256GB, Samsung EVO 250GB & 500GB SSD, 2TB Caviar Black, Zotac GTX 1080 AMP! Extreme 8GB, Corsair HX1000i, Phillips BDM4065UC 40" 4k monitor, VX2258 TouchScreen, TIR 5 w/ProClip, TM Warthog, VKB Gladiator Pro, Saitek X56, et. al., MFG Crosswind Pedals #1199, VolairSim Pit, Rift CV1 :thumbup:

Link to comment
Share on other sites

I really appreciate that, thanks a lot! I'll be back on Sunday or Monday.

Intel i9 10900K 5.2GHz · MSI Gaming X Trio RTX 3090 · ASUS ROG STRIX Z590-F Wi-Fi · Acer 4K 32" XB321HK · Samsung 970 500Gb M.2 NVMe · 2 x Samsung 850 Evo 1Tb · 2Tb HDD · 32Gb Corsair Vengance 3000MHz DDR4 · Windows 11 · Thrustmaster TPR Pedals · TrackIR5 · Thrustmaster F/A-18 Hornet Grip · Virpil WarBRD Base · Virpil Throttle MT-50 CM3 · Virpil Alpha Grip · Virpil Control Panel 2 · Thrustmaster F-16 MFDs · HTC Vive Pro 2

Link to comment
Share on other sites

I really appreciate that, thanks a lot! I'll be back on Sunday or Monday.

 

That is what I am here for. :santa:

ASUS ROG Maximus VIII Hero, i7-6700K, Noctua NH-D14 Cooler, Crucial 32GB DDR4 2133, Samsung 950 Pro NVMe 256GB, Samsung EVO 250GB & 500GB SSD, 2TB Caviar Black, Zotac GTX 1080 AMP! Extreme 8GB, Corsair HX1000i, Phillips BDM4065UC 40" 4k monitor, VX2258 TouchScreen, TIR 5 w/ProClip, TM Warthog, VKB Gladiator Pro, Saitek X56, et. al., MFG Crosswind Pedals #1199, VolairSim Pit, Rift CV1 :thumbup:

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...