Jump to content

Recommended Posts

Posted (edited)

Just got my throttle and thought I'd share how I managed to reprogram switches T1 through T4 as momentary switches. In restrospect, it shouldn't have taken hours but I finally figured it out. Big shout out to HavocCompanyClan's YouTube channel. https://www.youtube.com/user/HavocCompanyClan

 

What I wanted to do:

Change switches T1 through T4 to be two position momentary switches like the T5 through T7 switches. By default T1 through T4 represents a single continuous button press if the switch is flipped up and that button is released when the switch is flipped down.

 

Problem:

Many games, like DCS, only require a single button press to flip a switch. So like turning on an APU, or something like master arm. Sometimes the module treats it as a toggle, so sending a continuous button press wouldn't work so well cause that will just keep flipping things back and forth.

 

In addition, I wanted to use Joystick Gremlin to translate the button presses to keyboard presses. However, it turns out that Windows really doesn't like it if you hold down modifier buttons like Ctrl, Alt, Shift, and Windows Key, permanently. Cause well, they're modifiers and that can mess with your other button presses.

 

Solution:

Step 1: Change T1 and T4 to toggle a button. So when you flip a switch upwards, it actually presses a joystick button, and the releases it.

 

By default, when T1 is flipped up, it presses down physical button 42 or logical button 34. So in your VPC software, double click on this button and instead change it to 'Toggle On' and check the box to add a delay:

 

171537935_VPCSWCapture.JPG.f5ef5be6c6fedaaa871e49ce2fef31aa.JPG

 

If you use the VPC joystick tester, you'll see that when you flip the T1 switch up, it will activate button 34 on and then button 34 turns off after ~100ms.

 

Step 2: Make the switch flip down also toggle another button

When T1 is flipped down, it triggers physical button 41. However, out of the box, the throttle doesn't trigger a logical button. So you need to add one to your list. The first free logical button out of the box is logical button 61. So set it up just like the screenshot above, but instead, logical button is 61 and physical button is 41.

 

Now when you test it in the VPC joystick tester, you'll see also that when you flip T1 downwards, that button 61 will turn on and then turn off after ~100ms as well.

 

Step 3: Rinse and repeat for the other T2 through T4 buttons if desired.

Congrats, you can now map these buttons directly into DCS!

 

Step 4: Setup Joystick Grelim (optional)

Now, this step is completely optional, but if you want to remap the toggle to keyboard bindings, then you need this. The other thing I found is that Windows does not like 100ms of toggle at all if you use Ctrl, Alt, Windows Key, or Shift modifiers as a part of the keyboard remapping. That is just too short and I found that Windows thought those modifiers where stuck on, causing me endless frustration.

 

The solution was to actually create a macro with delay between pressing the modifier, a series of keys and then releasing the modifier. Havoc has a great video here:

 

But in short, you need to record a macro, with timings. So for example, I wanted button 34 to be represent Left Shift-A. Then it looks like below:

777793424_GremlinCapture.JPG.3e49fb74aefbb7468710883245706a95.JPG

 

Happy flying!

Edited by Shiny
  • Like 2
Posted

Interesting post. I have wondered why there is not a logical button for the down aspect of T1-T4 as default in the VPC software.

 

I have put them in, and I bind the different directions (up/down) to things like gear up/down, whereas before, I would have bound to cycle up and down which involves extra pressing, if you see what I mean!

Intel i7 12700K · MSI Gaming X Trio RTX 4090 · ASUS ROG STRIX Z690-A Wi-Fi · MSI 32" MPG321UR QD · Samsung 970 500Gb M.2 NVMe · 2 x Samsung 850 Evo 1Tb · 2Tb HDD · 32Gb Corsair Vengance 3000MHz DDR4 · Windows 11 · Thrustmaster TPR Pedals · Tobii Eye Tracker 5 · Thrustmaster F/A-18 Hornet Grip · Virpil MongoosT-50CM3 Base · Virpil Throttle MT-50 CM3 · Virpil Alpha Prime Grip · Virpil Control Panel 2 · Thrustmaster F-16 MFDs · HTC Vive Pro 2 · Total Controls Multifunction Button Box

Posted

Thanks for the shout out on my tutorials , I also found the 2 position toggle switches to only be useful configured like so, I really dont like that type I prefer the momentary ones or ones that latch in the outer position BUT have a centre neutral position

No more pre-orders

Click here for tutorials for using Virpil Hardware and Software

 

Click here for Virpil Flight equipment dimensions and pictures.

.

Posted

No problem on the tutorials. I keep going back to some for reference! Just one thing though, as I'm sure you well know, the switches one is out of date, as the options in the VPC software have changed quite dramatically since you did that vid.

Intel i7 12700K · MSI Gaming X Trio RTX 4090 · ASUS ROG STRIX Z690-A Wi-Fi · MSI 32" MPG321UR QD · Samsung 970 500Gb M.2 NVMe · 2 x Samsung 850 Evo 1Tb · 2Tb HDD · 32Gb Corsair Vengance 3000MHz DDR4 · Windows 11 · Thrustmaster TPR Pedals · Tobii Eye Tracker 5 · Thrustmaster F/A-18 Hornet Grip · Virpil MongoosT-50CM3 Base · Virpil Throttle MT-50 CM3 · Virpil Alpha Prime Grip · Virpil Control Panel 2 · Thrustmaster F-16 MFDs · HTC Vive Pro 2 · Total Controls Multifunction Button Box

Posted
Just got my throttle and thought I'd share how I managed to reprogram switches T1 through T4 as momentary switches. In restrospect, it shouldn't have taken hours but I finally figured it out. Big shout out to HavocCompanyClan's YouTube channel. https://www.youtube.com/user/HavocCompanyClan

 

What I wanted to do:

Change switches T1 through T4 to be two position momentary switches like the T5 through T7 switches. By default T1 through T4 represents a single continuous button press if the switch is flipped up and that button is released when the switch is flipped down.

 

Problem:

Many games, like DCS, only require a single button press to flip a switch. So like turning on an APU, or something like master arm. Sometimes the module treats it as a toggle, so sending a continuous button press wouldn't work so well cause that will just keep flipping things back and forth.

 

In addition, I wanted to use Joystick Gremlin to translate the button presses to keyboard presses. However, it turns out that Windows really doesn't like it if you hold down modifier buttons like Ctrl, Alt, Shift, and Windows Key, permanently. Cause well, they're modifiers and that can mess with your other button presses.

 

Solution:

Step 1: Change T1 and T4 to toggle a button. So when you flip a switch upwards, it actually presses a joystick button, and the releases it.

 

By default, when T1 is flipped up, it presses down physical button 42 or logical button 34. So in your VPC software, double click on this button and instead change it to 'Toggle On' and check the box to add a delay:

 

[ATTACH]234138[/ATTACH]

 

If you use the VPC joystick tester, you'll see that when you flip the T1 switch up, it will activate button 34 on and then button 34 turns off after ~100ms.

 

Step 2: Make the switch flip down also toggle another button

When T1 is flipped down, it triggers physical button 41. However, out of the box, the throttle doesn't trigger a logical button. So you need to add one to your list. The first free logical button out of the box is logical button 61. So set it up just like the screenshot above, but instead, logical button is 61 and physical button is 41.

 

Now when you test it in the VPC joystick tester, you'll see also that when you flip T1 downwards, that button 61 will turn on and then turn off after ~100ms as well.

 

Step 3: Rinse and repeat for the other T2 through T4 buttons if desired.

Congrats, you can now map these buttons directly into DCS!

 

Step 4: Setup Joystick Grelim (optional)

Now, this step is completely optional, but if you want to remap the toggle to keyboard bindings, then you need this. The other thing I found is that Windows does not like 100ms of toggle at all if you use Ctrl, Alt, Windows Key, or Shift modifiers as a part of the keyboard remapping. That is just too short and I found that Windows thought those modifiers where stuck on, causing me endless frustration.

 

The solution was to actually create a macro with delay between pressing the modifier, a series of keys and then releasing the modifier. Havoc has a great video here:

 

But in short, you need to record a macro, with timings. So for example, I wanted button 34 to be represent Left Shift-A. Then it looks like below:

[ATTACH]234139[/ATTACH]

 

Happy flying!

 

With regard to switches like APU, etc. there tends to be 2 types of configuration in DCS. Some have an on/off cycle switch (e.g. APU on the Hornet), and some have one for off and one for on (e.g. APU on the A-10C).

 

What I have found, is that the B buttons in their default state work nicely for the cycle type, and the T buttons work in 'normal' perfectly well if you bind up to on, and back to off. That is, of course, assuming you have added in the additional virtual buttons for the down state that are missing by default in VPC software.

Intel i7 12700K · MSI Gaming X Trio RTX 4090 · ASUS ROG STRIX Z690-A Wi-Fi · MSI 32" MPG321UR QD · Samsung 970 500Gb M.2 NVMe · 2 x Samsung 850 Evo 1Tb · 2Tb HDD · 32Gb Corsair Vengance 3000MHz DDR4 · Windows 11 · Thrustmaster TPR Pedals · Tobii Eye Tracker 5 · Thrustmaster F/A-18 Hornet Grip · Virpil MongoosT-50CM3 Base · Virpil Throttle MT-50 CM3 · Virpil Alpha Prime Grip · Virpil Control Panel 2 · Thrustmaster F-16 MFDs · HTC Vive Pro 2 · Total Controls Multifunction Button Box

  • 2 weeks later...
Posted

That's a cool mod. But after a couple of weeks of using it, I found that I don't actually want a physical momentary switch.

 

So for example, I use my T4 as my refueling probe extend / retract. So the physical position of the switch tells me whether or not my fuel probe (or door) is extended (opened) and I don't have to glance at my cockpit but I can feel the position of the switch.

 

In DCS, I don't want the joystick to keep pressing down the button. I know it'll work just fine on its own if you map the joystick button to fuel probe extend. But for other games, like Elite or Star Citizen, it won't recognize that many buttons and so I needed the joystick to press and release, so then it'll play well with joystick gremlin.

Posted

Whatever floats your boat. My feeling is DCS, especially the more recent modules, does a better job letting momentary buttons emulate latching switches then latching switches could ever emulate a momentary one. And with most other titles latching switches are nearly useless.

 

 

 

Having the positional feedback is certainly nice, but having to remember to reset switch states before any mission loads gets tiresome, and if I consistently forget to do it, then that physical feedback is no longer trustworthy anyway. I know you can write lua scripts to automatically sync switch states, but I still have to remember to reset switches lest I find myself starting a mission at 600kts and with gear and flaps down.

Posted (edited)

My preferred solution for using maintained switches in DCS World is to edit the input LUAs to the aircraft in question. In the case of a two-position switch, like landing gear, refueling probe, etc. I duplicate one of the existing commands intended for two inputs, i.e. one button for lower gear and one button for raise gear, and modify that command to also provide the opposite function when the switch is off.

 

This setup accomplishes three things:

 

1) I get the ideal case of the switch position matching the in-game switch/lever position.

 

2) Before starting a mission, the in-game switches do not flip to undesired states. Note: I have the DCS Synchronize cockpit controls with HOTAS controls option unchecked for just this purpose. So, in the case of a landing gear lever, if I start the sim on a ramp/runway with the mapped toggle switch in the gear up position, the in-game lever does not jump up when I start the mission. I do have to toggle the switch down before I can raise the lever, but once this is done, the real switch and the virtual lever remain in sync. Most of the time I flip all of my throttle switches to their "off" states before starting a mission, which means they will either work first try like the landing gear lever from a ramp start or will get synced first try like the landing gear lever during an air start. I never have problems caused by inadvertent switch positions, especially when I have done a quick "off" state preflight check.

 

3) LUA edits mean I don't have to mess with custom joystick/throttle configuration software like Target profiles. Whenever I get a new module, I have to decide what controls are going to use maintained switches and if the developer doesn't provide the command I need, then I have to customize that aircraft's LUA. But these days, a lot of the third party mods include the type of mapping needed to support maintained toggle switches for in-game two position switches and some even support three positions with the center state being off, such as flap levers.

 

There is one annoying disadvantge to my approach. Every DCS patch resets all of the LUA files back to defaults. It is easy enough to find my latest custom LUA versions in the backup folder, but it is dangerous to just past them back over the new ones. ED and the third parties provide new mappings and/or fix bugs in old ones, so I open each LUA and do a file compare before pasting in my custom lines. On a good day, the developer has provided a new command that makes my custom script unnecessary, but there are not many good days. So, I get tired of constantly having to update the LUAs after patches, but I love monitoring the control mappings for changes. Many times, something I wanted was fixed/added and I would not have even known about it if I had not kept doing file compares with the joystick input LUAs between the current patch and the last one.

 

Here are some of my edits for the DCS F/A-18C Hornet joystick input default.LUA, including the Battery Switch, which has three positions and therefore uses two of the custom commands to cover the center state as the off position for the other two commands:

 

---------------------------------------------

-- Alt Commands for Warthog Throttle --------

---------------------------------------------

{ down = iCommandPlaneGearUp, up = iCommandPlaneGearDown, name = _('Alt Landing Gear Control Handle - UP/DOWN'), category = {_('Left Vertical Panel')}},

{ down = extlights_commands.LdgTaxi, up = extlights_commands.LdgTaxi, cockpit_device_id = devices.EXT_LIGHTS, value_down = 1.0, value_up = 0.0, name = _('Alt LDG/TAXI LIGHT Switch - ON/OFF'), category = {_('Left Vertical Panel')}},

{ down = gear_commands.AntiSkidSw, up = gear_commands.AntiSkidSw, cockpit_device_id = devices.GEAR_INTERFACE, value_down = 1.0, value_up = 0.0, name = _('Alt Anti Skid Switch - ON'), category = {_('Left Vertical Panel')}},

{ down = elec_commands.BattSw, up = elec_commands.BattSw, cockpit_device_id = devices.ELEC_INTERFACE, value_down = 1.0, value_up = 0.0, name = _('Alt Battery Switch - ON/OFF'), category = {_('Right Console'), _('Electrical Power Panel')}},

{ down = elec_commands.BattSw, up = elec_commands.BattSw, cockpit_device_id = devices.ELEC_INTERFACE, value_down = -1.0, value_up = 0.0, name = _('Alt Battery Switch - ORIDE/OFF'), category = {_('Right Console'), _('Electrical Power Panel')}},

{ down = gear_commands.LaunchBarSw, up = gear_commands.LaunchBarSw, cockpit_device_id = devices.GEAR_INTERFACE, value_down = 1.0, value_up = 1.0, name = _('Alt Launch Bar Control Switch - EXTEND/RETRACT'), category = {_('Left Vertical Panel')}},

Edited by streakeagle

[sIGPIC][/sIGPIC]

Posted

When you have a lot of three position toggle switches but not a lot of three position functions in an aircraft, it does make sense to use momentary switches with toggle functions to double your control options. T5, T6, and T7 can provide 6 two-position functions when mapped to in-game toggles.

 

If you never use maintained position switches, it would be beneficial for you to replace the physical maintained position switches wtih momentary toggle switches. Then you wouldn't need any custom programming to try to make them behave like momentaries and you wouldn't have to manually re-center them after every "press". This is especially beneficial in most other fllight sims that design their controls conventionally for keyboard mapping and cheaper grade HOTAS and sticks that only have momentary buttons.

[sIGPIC][/sIGPIC]

  • 1 year later...
  • Recently Browsing   0 members

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