Jump to content

2/3 Position Switch Query


LankNZ

Recommended Posts

Good Evening fellow aviators.

 

Has anyone managed to add a line to the "Special for Joystick" section for Gear Up/Gear Down yet?

 

On my TM Warthog using the 2 position switches if a switch is up, gear comes up. Switch down, nothing. Switch back up, gear down and so on.

 

Pretty sure it just needs a line in the txt doc similar to the speed brake line but I don't yet have the know how to add it myself.

Link to comment
Share on other sites

Here you go:

 

 

{ down = iCommandPlaneGearUp, up = iCommandPlaneGearDown, name = _('Landing Gear Control Handle - UP/DOWN'), category = {_('Special Toggle')}},

 

Just add somewhere in the joystick.lua . Made up the Special Toggle Category to find it quickly

Win 10 Pro 64 - i6700K @ 4.7GHz - MSI 1080ti Gaming X OC - 32 GB DDR4 Fury X - 1x 512GB 960 Pro SSD - 1x 512GB 850 Pro SSD - TM Cougar - TM Warthog - MHG Crosswind - Rift CV1 - Track IR 5

Link to comment
Share on other sites

  • 7 months later...

Forgive the thread necromancy - I'm trying to replicate what you've done, but am running into some issues. Should the command you show be listed in the default.lua or the .diff.lua specific to the controller?

 

 

Thanks!

Windows 10 Pro 64Bit | i5-7600K CPU |32 GB RAM|SSD System Disk|SSD Gaming Disk| Gigabyte Aorus GTX-1080Ti Gaming 12 GB| 55" 4K | TM Warthog HOTAS | Virpil MongoosT-50 | BRD Pedals | TrackIR 5

Link to comment
Share on other sites

Disregard - found some additional documentation that explained the interrelationship between the .lua files. :)

Windows 10 Pro 64Bit | i5-7600K CPU |32 GB RAM|SSD System Disk|SSD Gaming Disk| Gigabyte Aorus GTX-1080Ti Gaming 12 GB| 55" 4K | TM Warthog HOTAS | Virpil MongoosT-50 | BRD Pedals | TrackIR 5

Link to comment
Share on other sites

default.lua (or specific controller). The .lua defines what the control entries are and their default binds.

 

The .diff.lua defines how your personal bind preferences are different from the defaults. You cannot define new commands in the .diff.lua

Link to comment
Share on other sites

(Or use TARGET. I use TARGET to define 120 DX states on the TMWH virtual combined joystick, for even to include middle positions, so you can do Release states from the DCS control interface (which is DirectX))

| VR goggles | Autopilot panel | Headtracker | TM HOTAS | G920 HOTAS | MS FFB 2 | Throttle Quadrants | 8600K | GTX 1080 | 64GB RAM| Win 10 x64 | Voicerecognition | 50" UHD TV monitor | 40" 1080p TV monitor | 2x 24" 1080p side monitors | 24" 1080p touchscreen |

Link to comment
Share on other sites

(Or use TARGET. I use TARGET to define 120 DX states on the TMWH virtual combined joystick, for even to include middle positions, so you can do Release states from the DCS control interface (which is DirectX))

 

That is actually very smart.

 

Do you mind sharing that profile ?

[sIGPIC]https://forums.eagle.ru/signaturepics/sigpic70550_3.gif[/sIGPIC]

Asus Z390-H - SSD M.2 EVO 970 - Intel I9 @5.0ghz - 32gb DDR4 4000 - EVGA 3090 - Cougar FSSB + Virpil WRBRD + Hornet Stick - Thrustmaster TPR Pedal + WinWing MIP + Orion + TO and CO pannels - Track IR5

Link to comment
Share on other sites

That is actually very smart.

 

Do you mind sharing that profile ?

Here you are, my DX 120 button tmc’s for the TARGET virtual combined joystick, this can be used for any plane TMWH, not my design, it defines all middle position and Off positions with a DX number for use in the DCS control panel.

 

THUS, when defining bindings in DCS Control, you have to KEEP the switch to the definition position, unlike the original, or you’re defining the Off position when you let go of the switch.

 

This is a cleaned up definition TMWH DX tmc from my own (lots of my stuff was edited in there),

 

F18_DX120.tmc , have NOT checked for bugs afterwards

 

you also need

 

targetdx120.tmh

 

which is the linked file as per ‘include "targetdx120.tmh"’ to replace/update the target.tmh in the program \TARGET\scripts directory from DX32 to DX120, also somewhat cleaned, please when compile ('RUN') 1st time with TARGET Script Editor, read the compilation output at the bottom, to find possible error codes.

CLEANED DX120 DCS TMWH.rar

| VR goggles | Autopilot panel | Headtracker | TM HOTAS | G920 HOTAS | MS FFB 2 | Throttle Quadrants | 8600K | GTX 1080 | 64GB RAM| Win 10 x64 | Voicerecognition | 50" UHD TV monitor | 40" 1080p TV monitor | 2x 24" 1080p side monitors | 24" 1080p touchscreen |

Link to comment
Share on other sites

Is there a list of these commands somewhere, ie for commands like tailhook, masterarm, A/A mode, AG mode etc?

 

 

In Options/Controls click on MAKE HTML button. In File Explorer navigate to the new .html files, open and save as .xls or other more convenient format.

Link to comment
Share on other sites

Is there a list of these commands somewhere, ie for commands like tailhook, masterarm, A/A mode, AG mode etc?

Exactly these tailhook, masterarm, have Up/Dwn, ON/OFF definitions, so you don't need additional commands.

A/A mode, AG mode are toggles but that's not a problem in these cases I'd say?

| VR goggles | Autopilot panel | Headtracker | TM HOTAS | G920 HOTAS | MS FFB 2 | Throttle Quadrants | 8600K | GTX 1080 | 64GB RAM| Win 10 x64 | Voicerecognition | 50" UHD TV monitor | 40" 1080p TV monitor | 2x 24" 1080p side monitors | 24" 1080p touchscreen |

Link to comment
Share on other sites

  • 1 month later...

Sorry to bring this back up, but the recent patch overwrote my modifications to the default.lua files so I've now lost the changes I had made :(

 

 

Here's the goal:

 

 

my Warthog Throttle has two-way switches (EAC and RDR ALTM) that I want to map to F/A-18's gear and hook controls respectively. Unfortunately, Thrustmaster has setup the switches so that it only sends one DX button press when the switch is turned to the 'ON' position and sends nothing when going to 'OFF' The goal is to map these to Gear Up or Hook Up when in the 'ON' position and Gear/Hook Down when in the off position.

 

 

NOTE: I DO NOT wish to use TARGET scripting to accomplish this. I'm aware of the Press/Release functionality, but don't want to load different profiles as I'm notoriously bad at remembering :D

 

 

Two questions:

 

 

1.) Is it going to be required to create a different function in the Keyboard Default.lua file that will work with Press and release of the switch? My concern is once again losing the work.

 

 

2.) Any way of mapping this into my user.lua files so that I don't lose them?

 

 

Thanks!

Windows 10 Pro 64Bit | i5-7600K CPU |32 GB RAM|SSD System Disk|SSD Gaming Disk| Gigabyte Aorus GTX-1080Ti Gaming 12 GB| 55" 4K | TM Warthog HOTAS | Virpil MongoosT-50 | BRD Pedals | TrackIR 5

Link to comment
Share on other sites

One more question: Last time I did this, I saw issues where the switches would not initially function because the in-plane control position did not match the switch position on my controls. Any workaround suggestions?

Windows 10 Pro 64Bit | i5-7600K CPU |32 GB RAM|SSD System Disk|SSD Gaming Disk| Gigabyte Aorus GTX-1080Ti Gaming 12 GB| 55" 4K | TM Warthog HOTAS | Virpil MongoosT-50 | BRD Pedals | TrackIR 5

Link to comment
Share on other sites

One more question: Last time I did this, I saw issues where the switches would not initially function because the in-plane control position did not match the switch position on my controls. Any workaround suggestions?

I use a target script that loads 120 DX on/off states for every switch, so the definitions can all be done in the DCS controls. It's couple of replies here above, attached.

| VR goggles | Autopilot panel | Headtracker | TM HOTAS | G920 HOTAS | MS FFB 2 | Throttle Quadrants | 8600K | GTX 1080 | 64GB RAM| Win 10 x64 | Voicerecognition | 50" UHD TV monitor | 40" 1080p TV monitor | 2x 24" 1080p side monitors | 24" 1080p touchscreen |

Link to comment
Share on other sites

I appreciate that majapahit, but I don't want to get into TARGET again - I used TM's programming tools for years, but TARGET is just a hot mess. Last year I lost the ability to program my Warthog because of a Windows update (driver change) and I won't put myself into that position again, especially after TM's lack of response.

Windows 10 Pro 64Bit | i5-7600K CPU |32 GB RAM|SSD System Disk|SSD Gaming Disk| Gigabyte Aorus GTX-1080Ti Gaming 12 GB| 55" 4K | TM Warthog HOTAS | Virpil MongoosT-50 | BRD Pedals | TrackIR 5

Link to comment
Share on other sites

Sorry to bring this back up, but the recent patch overwrote my modifications to the default.lua files so I've now lost the changes I had made :(

 

 

Here's the goal:

 

 

my Warthog Throttle has two-way switches (EAC and RDR ALTM) that I want to map to F/A-18's gear and hook controls respectively. Unfortunately, Thrustmaster has setup the switches so that it only sends one DX button press when the switch is turned to the 'ON' position and sends nothing when going to 'OFF' The goal is to map these to Gear Up or Hook Up when in the 'ON' position and Gear/Hook Down when in the off position.

 

 

NOTE: I DO NOT wish to use TARGET scripting to accomplish this. I'm aware of the Press/Release functionality, but don't want to load different profiles as I'm notoriously bad at remembering :D

 

 

Two questions:

 

 

1.) Is it going to be required to create a different function in the Keyboard Default.lua file that will work with Press and release of the switch? My concern is once again losing the work.

 

 

2.) Any way of mapping this into my user.lua files so that I don't lose them?

 

 

Thanks!

 

I am not 100% sure I understand your questions correctly and not sure why you want to use the keyboard.lua. Here are the commands I use for the Hook and the Gear that will work with a WH 2 pos switch.

 

These go in C:\Program Files\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\FA-18C\Input\FA-18C\joystick\default.lua

 

{   down = iCommandPlaneGearUp,                      up = iCommandPlaneGearDown,                                                                                                             name = _('Landing Gear Control Handle'),        category = {_('Special For Joystick')}},
{   down = gear_commands.HookHandle,                 up = gear_commands.HookHandle,                   cockpit_device_id = devices.GEAR_INTERFACE,    value_down =  1.0,   value_up = 0.0,    name = _('Arresting Hook Handle'),              category = {_('Special For Joystick')}},

 

You will need to keep a backup of this lua file because any updates will over write it. Try use OVGME to make this simple.

 

In another of your posts you mention about switches not being in the same position as the Plane when you first jump in the cockpit. You need to go into DCS Options > Misc > set the Synchronize Cockpit Controls with HOTAS Controls at Mission Start checkbox.

 

This does not always work, but it is the best we have for now.

 

Good luck

Link to comment
Share on other sites

  • Recently Browsing   0 members

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