Jump to content

Control Bindings for maintained Switches


LeCuvier

Recommended Posts

I had been trying some time ago to create control bindings that allow the use of maintained switches for several commands which are implemented as maintained switches (mostly 2-position) in the clickable cockpit, but could only be bound to momentary switches/buttons. I was not successful at that time, but with some recent experience from other aircrafts I took another shot and I was successful.

The following lines of code were created after analysis of the "clickabledata.lua" file and some trial & error. They provide bindings for 2-position ON/OFF control for these commands:

- Laser Standby 2-Position ON/OFF

- Automatic Tracking Gunsight 2-Pos ON/OFF

- Master Arm 2-Ps ON/OFF

- Cannon rate of fire 2-Pos LOW/HIGH

- Cannon round selector 2-Pos HE/API

{down = 3001, up = 3001, value_down = 1, value_up = 0, cockpit_device_id = 11, name = _('Laser standby 2-Pos ON/OFF Switch'), category = _('Ins Targeting Mode Controls Panel PVR')},
{down = 3017, up = 3017, value_down = 1.0, value_up = -1.0, cockpit_device_id = 12, name = _('Automatic tracking/gun sight 2-Pos ON/OFF'), category = _('Ins Targeting Mode Controls Panel PVR')},
{down = 3001, up = 3001, value_down = 1.0, value_up = -1.0, cockpit_device_id = 12, name = _('Master arm 2-Pos ON/OFF'), category = _('Ins Weapons Status and Control Panel PUI-800')},
{down = 3020, up = 3020, value_down = 1.0, value_up = 0.0, cockpit_device_id = 12, name = _('Cannon rate of fire 2-Pos LOW/HIGH'), category = _('Ins Weapons Status and Control Panel PUI-800')},
{down = 3006, up = 3006, value_down = 1.0, value_up = -1.0, cockpit_device_id = 12, name = _('Cannon round selector 2-Pos HE/API'), category = _('Ins Weapons Status and Control Panel PUI-800')},

Also, I could not find any bindings for the Weapon Mode Burst Length switch which has 3 positions (High/Medium/Short). I created the 2 lines of code below for use with a maintained 3-position (ON-OFF-ON) switch:

{down = 3004, up = 3004, value_down = 0.2, value_up = 0.1, cockpit_device_id = 12, name = _('Weapon mode Burst Length 3-Pos HIGH/MEDIUM'), category = _('Ins Weapons Status and Control Panel PUI-800')},
{down = 3004, up = 3004, value_down = 0.0, value_up = 0.1, cockpit_device_id = 12, name = _('Weapon mode Burst Length 3-Pos LOW/MEDIUM'), category = _('Ins Weapons Status and Control Panel PUI-800')},

For use with a button box they should be added to the file "default.lua" for the KA-50. If you use a TM Warthog HOTAS you will find separate files like "Joystick - HOTAS Warthog.lua" and "Throttle - HOTAS Warthog.lua". Any commands you want to bind to these devices must be added to the related file. The same applies probably for some other HOTAS, for which ED provides product-specific versions of the "default.lua" .

If somebody needs more of these custom bindings for the KA-50 I can probably create them.

LeCuvier

Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5

Link to comment
Share on other sites

  • 2 weeks later...
This doesn't belong in bugs and problems..

I thought about this comment for a while, and I'm not saying that Ranma13 is wrong. However I came to the conclusion that it was right to create this thread under "bugs and problems". Where the real aircraft and the clickable cockpit have maintained switches, and ED has not provided bindings for maintained switches, ED has created a problem for users who want to have realistic controls or even build a realistic cockpit. Whether that's a bug or not is an academic question. It's a problem.

LeCuvier

Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5

Link to comment
Share on other sites

  • 1 month later...

The issue is that there's a multitude of ways that a control can be bound, and a variety of switch types. Let's take the RALT/BARO switch for example, which has 3 positions:

 

1. You have a ON-OFF-ON latching switch. You need two bindings for RALT and BARO, where releasing the switch returns it to the center position.

 

2. You have an ON-ON-ON latching switch. You need three bindings for RALT, BARO, and the center position. It's arguable that you can just use the same bindings as #1, but DCS sometimes has a hard time syncing the position of a switch that's in an OFF position, requiring you to cycle the switch to sync it up. This issue is avoided with an ON-ON-ON switch and 3 separate bindings.

 

3. You have an (ON)-OFF-(ON) momentary switch and want the switch to be absolute (moving the switch up will select BARO, moving it down will select RALT). You need two bindings for RALT and BARO, where releasing the switch does not return it to the center position. Note that this means that the center position is not selectable.

 

4. You have an (ON)-OFF-(ON) momentary switch and want the switch to be relative (moving the switch up will move the cockpit switch up one position, moving it down will move the cockpit switch down one position). You need two bindings, one to move the switch up, and one to move it down.

 

5. Same as #4, but now you want the switch to wrap around so that if you move the switch up when it's already in BARO position (top position), it will jump to RALT (bottom position).

 

6. You want just a toggle binding where pressing a button or using a momentary switch will always move the switch down one position, with wrap around. This is what's currently already in the bindings.

 

All of these bindings are valid for different controllers. The TM Warthog mostly has latching switches, but the Saitek X56 only has momentary switches. Other controllers only have buttons or 4-way hats. If ED added all of these switch bindings, you're talking about 9 different bindings just for a single 3-position switch. Now multiply that across all of the cockpit controls and you can see how it will blow up the size of the controls list.

 

Don't get me wrong, I feel that the control bindings in pretty much all combat flight sims should be reworked to support multiple input types. However, they can't just add additional inputs to the list and call it a day, because it would make the list too long. Ideally, we'd have some kind of system similar to the axis binding where you select the cockpit control you want to bind, then a separate dialog opens up that asks you what kind of binding you want to set depending on what kind of controller you have.

Link to comment
Share on other sites

@Ranma13: We can argue about these complexities forever. My point is that where the simulated cockpit has a maintained 2-position switch we should be able to bind that command to a physical switch of the same nature. Same for 3-position. And, yes, there should be a toggle option as well.


Edited by LeCuvier

LeCuvier

Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5

Link to comment
Share on other sites

And my point is that it's not as simple as you put it. A 'physical switch of the same nature' means different things depending on whether you have a latching or a momentary switch. Even a 2-position switch needs 5 different bindings to cover all the use cases.

 

It's easy enough to say 'it should have it' and dismiss me by saying 'we can argue about these complexities forever', but it's exactly those complexities that make it impractical to cover all the use cases through adding more bindings.

 

Regardless, you can add in the necessary bindings by editing the lua file. I still stand by my original point that this doesn't belong in Bugs and Problems, it's just your own personal nitpick.

Link to comment
Share on other sites

Sorry for jumping in on a discussion I'm not part of, but I sense a possible misunderstanding. Correct me if I'm wrong.

I believe LeCuvier request that switches and knobs of certain kinds IN THE COCKPIT should have binding possibilities for an IDENTICAL ONE on your desk, regardless of commercialy avaliable controllers. Like the altitude switch, a three way switch without springs, not necessarily for other types. Cockpit builders tend to utilize as authentic equipment as possible. This would not add binding possibilities exponentially, maybe twofold, but not much more than that.

Helicopters and Viggen

DCS 1.5.7 and OpenBeta

Win7 Pro 64bit

i7-3820 3.60GHz

P9X79 Pro

32GB

GTX 670 2GB

VG278H + a Dell

PFT Lynx

TrackIR 5

Link to comment
Share on other sites

Sorry for jumping in on a discussion I'm not part of, but I sense a possible misunderstanding. Correct me if I'm wrong.

I believe LeCuvier request that switches and knobs of certain kinds IN THE COCKPIT should have binding possibilities for an IDENTICAL ONE on your desk, regardless of commercialy avaliable controllers. Like the altitude switch, a three way switch without springs, not necessarily for other types. Cockpit builders tend to utilize as authentic equipment as possible. This would not add binding possibilities exponentially, maybe twofold, but not much more than that.

Correct, that's my point.

LeCuvier

Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5

Link to comment
Share on other sites

Not everyone is going to be building a cockpit, and there are many more people who have controllers that don't match 1:1 with the cockpit controls. For custom cockpit builders, editing the input lua file is probably the easiest step in building a cockpit, and whether those extra bindings exist or not is not really a big deal, especially for those tricky switches that can't be matched 1:1 (like the navigation lights switch, which is a 4-way switch where the top position is momentary and the other 3 positions are latching).

 

Where the pre-included bindings would matter a lot though are for people who are only using commercial throttles and don't have the skills to add in new bindings. Saying "just add in bindings that match the physical cockpit switches" would be ignoring the fact that only one throttle has latching switches, the TM Warthog. What about those using the Saitek X52, Saitek X56, CH Pro Throttle, and the TM.16000M? Should those users be completely ignored simply because they don't have switches that act like how they do in the real Ka-50? Just as how you feel that only the bindings for latching switches should be added because it corresponds to the actual switch in the cockpit, I can equally make the argument that only the bindings for momentary switches should be added because that's what every other throttle besides the TM Warthog uses.

 

So my point is, this is not a bug, it's a feature request. The bindings should be added eventually, but it's not as simple as "match the bindings with the physical switch", because not everyone is going to use the same hardware. If ED wants to support different devices with different switch types, then they will need to consider all devices and not just a particular one.


Edited by Ranma13
Link to comment
Share on other sites

During my career I had many discussions about what's a bug and what isn't, and I don't want to bore anybody by repeating them.

But the title of this subforum is "bugs and PROBLEMS". And while you can argue for years about the definition of "bug", the subject is undoubtedly a problem for many people and that's why I put my post here.

 

And this is my last post under this thread.

LeCuvier

Windows 10 Pro 64Bit | i7-4790 CPU |16 GB RAM|SSD System Disk|SSD Gaming Disk| MSI GTX-1080 Gaming 8 GB| Acer XB270HU | TM Warthog HOTAS | VKB Gladiator Pro | MongoosT-50 | MFG Crosswind Pedals | TrackIR 5

Link to comment
Share on other sites

+1 LeCuvier

 

I'd personally love to see more flexible controls, especially considering that the Ka-50 is my favourive module. I guess a decent solution might be using pair of controls to scroll "up and down" through the controls (RAZBAM has done the same thing with their AV-8B). Probably not the best solution for cockpit builders, but definitely handy for everyone else.

 

That being said, as soon as I have some spare time I'll dive onto the lua files. I've just built a small button box for the Virpil desk mount and it sucks not having appropriate controls to assign to it.

full_tiny.pngfull_tiny.png
full_tiny.png

"Cogito, ergo RIO"
Virtual Backseaters Volume I: F-14 Radar Intercept Officer - Fifth Public Draft
Virtual Backseaters Volume II: F-4E Weapon Systems Officer - Internal Draft WIP

Phantom Phamiliarisation Video Series | F-4E/F-14 Kneeboard Pack

Link to comment
Share on other sites

  • Recently Browsing   0 members

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