Jump to content

Quaggles - DCS Input Command Injector Mod - Store custom input commands safely in Saved Games instead of merging them with developer changes each update


Quaggles

Recommended Posts

3 hours ago, Fakum said:

Im sorry if this has been covered, but I am reading through all of this trying to find out how to add a Custom command in the Apache to allow the back seater to hit the “Slave button” Im not a Coder, how can I add this function to my current Custom Options? I have Monkwolf’s Input file installed.

 

I have this:

image.png

Im looking to add this to the Custom List:

image.png

Thank you for any help

The command "RHG Sight Slave Button" is already available for the CPG. What are you trying to add?

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

As I stated above, I am trying to add "RHG Sight Slave Button" to the Pilot seat via the "CUSTOM" menu in the Pilot controls. I know it exists in the Front seat.

image.png

Windows 10 Pro - 64 Bit / ASUS ROG Strix B650E-F Gaming / AMD 7800X3D / G.Skill Trident Z5 NEO 64GB DDR5 6000 Ram / SSD M.2 SK hynix Platinum P41 2TB / MSI Gaming GeForce RTX 4090 SUPRIM Liquid X 24G / SteelSeries Arctis 7 Headset /LG-Ultragear 38" IPS LED Ultrawide HD Monitor (3840 x 1600) / Track IR4 / Thrustmaster TPR Pendular Rudder Pedals / Virpil HOTAS VPC Constellation ALPHA-R & VPC MongoosT-50CM3 Throttle

 

Link to comment
Share on other sites

Oops, I'm not familiar with the Apache although I have the module, and I wrongly assumed that the aft cockpit is for the CPG.

The command for the CPG is defined in this line in the "default.lua" under "DRIVE:\Eagle Dynamics\DCS World OpenBeta\Mods\aircraft\AH-64D\Input\AH-64D_CPG\joystick":

{down = tedac_commands.RHG_SIGHT_SLAVE_BTN, up = tedac_commands.RHG_SIGHT_SLAVE_BTN, cockpit_device_id = devices.TEDAC_INPUT, value_down =  1.0, value_up = 0.0, name = _('RHG Sight Slave Button'), category = {_('TEDAC'), _('Right Handgrip')}},


You can add this line into the "default.lua" under "C:\Users\USER\Saved Games\DCS.openbeta\InputCommands\AH-64D\Input\AH-64D_PLT\joystick".
But I'm not sure that the software will let the pilot use this command. Also, I wouldn't know how to test it as the pilot doesn't see this button.


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

@LeCuvier MANY THANKS! You led me down the path I needed. I now have that command option in the Pilots "Custom" menu to bind. I had to modify the end of that string so it would be inserted in the "Custom" menu. I know that button is not in the Pilots seat, neither are the other ones in the Custom menu. That is the whole point of the Custom menu, so that you can use them when you dont have a Human front seater with you and you dont want the fuss of switching seats while in flight when George is up there. Thanks again!

{down = tedac_commands.RHG_SIGHT_SLAVE_BTN, up = tedac_commands.RHG_SIGHT_SLAVE_BTN, cockpit_device_id = devices.TEDAC_INPUT, value_down =  1.0, value_up = 0.0, name = _('RHG Sight Slave Button'), category = {('Custom')}},

image.png

  • Like 1

Windows 10 Pro - 64 Bit / ASUS ROG Strix B650E-F Gaming / AMD 7800X3D / G.Skill Trident Z5 NEO 64GB DDR5 6000 Ram / SSD M.2 SK hynix Platinum P41 2TB / MSI Gaming GeForce RTX 4090 SUPRIM Liquid X 24G / SteelSeries Arctis 7 Headset /LG-Ultragear 38" IPS LED Ultrawide HD Monitor (3840 x 1600) / Track IR4 / Thrustmaster TPR Pendular Rudder Pedals / Virpil HOTAS VPC Constellation ALPHA-R & VPC MongoosT-50CM3 Throttle

 

Link to comment
Share on other sites

3 hours ago, Fakum said:

...That is the whole point of the Custom menu, so that you can use them when you dont have a Human front seater with you and you dont want the fuss of switching seats while in flight when George is up there...

Interesting, I learned something!

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

Good day for both of us then :}

 

Windows 10 Pro - 64 Bit / ASUS ROG Strix B650E-F Gaming / AMD 7800X3D / G.Skill Trident Z5 NEO 64GB DDR5 6000 Ram / SSD M.2 SK hynix Platinum P41 2TB / MSI Gaming GeForce RTX 4090 SUPRIM Liquid X 24G / SteelSeries Arctis 7 Headset /LG-Ultragear 38" IPS LED Ultrawide HD Monitor (3840 x 1600) / Track IR4 / Thrustmaster TPR Pendular Rudder Pedals / Virpil HOTAS VPC Constellation ALPHA-R & VPC MongoosT-50CM3 Throttle

 

Link to comment
Share on other sites

10 hours ago, Fakum said:

@LeCuvier MANY THANKS! You led me down the path I needed. I now have that command option in the Pilots "Custom" menu to bind. I had to modify the end of that string so it would be inserted in the "Custom" menu. I know that button is not in the Pilots seat, neither are the other ones in the Custom menu. That is the whole point of the Custom menu, so that you can use them when you dont have a Human front seater with you and you dont want the fuss of switching seats while in flight when George is up there. Thanks again!

{down = tedac_commands.RHG_SIGHT_SLAVE_BTN, up = tedac_commands.RHG_SIGHT_SLAVE_BTN, cockpit_device_id = devices.TEDAC_INPUT, value_down =  1.0, value_up = 0.0, name = _('RHG Sight Slave Button'), category = {('Custom')}},

image.png

I also find it useful to change the name of the "Action" to add "PILOT " to the start of it, that makes it very clear. 
I added a lot of the F14 RIO commands to the front seat in the Tomcat like this, since Jester is a little bit daft sometimes

  • Like 1

Pimax Crystal VR & Simpit User | Ryzen CPU & Nvidia RTX GPU | Some of my mods

Link to comment
Share on other sites

@TAIPAN_ "I also find it useful to change the name of the "Action" to add "PILOT " to the start of it,"

I have no idea what you mean by that, can you elaborate please? Thanks

Windows 10 Pro - 64 Bit / ASUS ROG Strix B650E-F Gaming / AMD 7800X3D / G.Skill Trident Z5 NEO 64GB DDR5 6000 Ram / SSD M.2 SK hynix Platinum P41 2TB / MSI Gaming GeForce RTX 4090 SUPRIM Liquid X 24G / SteelSeries Arctis 7 Headset /LG-Ultragear 38" IPS LED Ultrawide HD Monitor (3840 x 1600) / Track IR4 / Thrustmaster TPR Pendular Rudder Pedals / Virpil HOTAS VPC Constellation ALPHA-R & VPC MongoosT-50CM3 Throttle

 

Link to comment
Share on other sites

He changes the "Name" field in the .LUA line by adding "Pilot" as a prefix.

  • Like 1

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

I still dont know what that would do for me? Im thinking it would then add that CPG function to the Pilot and then show up in the Pilots controls for mapping, basically doing the same that I am doing in the "Custom" category for the Pilot perhaps?

Windows 10 Pro - 64 Bit / ASUS ROG Strix B650E-F Gaming / AMD 7800X3D / G.Skill Trident Z5 NEO 64GB DDR5 6000 Ram / SSD M.2 SK hynix Platinum P41 2TB / MSI Gaming GeForce RTX 4090 SUPRIM Liquid X 24G / SteelSeries Arctis 7 Headset /LG-Ultragear 38" IPS LED Ultrawide HD Monitor (3840 x 1600) / Track IR4 / Thrustmaster TPR Pendular Rudder Pedals / Virpil HOTAS VPC Constellation ALPHA-R & VPC MongoosT-50CM3 Throttle

 

Link to comment
Share on other sites

It does nothing other than emphasizing to the user that it's the "Pilot" version of a command normally reserved for the CPG.

  • Like 1

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

13 hours ago, Fakum said:

@TAIPAN_ "I also find it useful to change the name of the "Action" to add "PILOT " to the start of it,"

I have no idea what you mean by that, can you elaborate please? Thanks

Sorry I actually meant "RIO" not pilot, since I'm usually the pilot 🙂

For example the F-14 has two radios, one for each person. It makes it very clear when I'm binding to the RIOs radio. Some examples of the Binds I added to the pilot seat:

 

image.png

  • Like 1

Pimax Crystal VR & Simpit User | Ryzen CPU & Nvidia RTX GPU | Some of my mods

Link to comment
Share on other sites

Gottcha, thanks

 

Windows 10 Pro - 64 Bit / ASUS ROG Strix B650E-F Gaming / AMD 7800X3D / G.Skill Trident Z5 NEO 64GB DDR5 6000 Ram / SSD M.2 SK hynix Platinum P41 2TB / MSI Gaming GeForce RTX 4090 SUPRIM Liquid X 24G / SteelSeries Arctis 7 Headset /LG-Ultragear 38" IPS LED Ultrawide HD Monitor (3840 x 1600) / Track IR4 / Thrustmaster TPR Pendular Rudder Pedals / Virpil HOTAS VPC Constellation ALPHA-R & VPC MongoosT-50CM3 Throttle

 

Link to comment
Share on other sites

  • 4 weeks later...

Is there a way to use this to set a master arm toggle on the F-5 (GMC switch to GMC or OFF, don't care about training mode)?

I've got a VPC control panel and would like to use the covered switch for that purpose, unfortunately the thing is 1/0/1 momentary and sends 1 (down) when the cover is closed, with the cover spring holding it in place.

I know that hypothetically I could use the Virpil command configuration software to set 1 (up) as a software toggle, then add GMC<>OFF, but that means I have to cycle the master arm twice every time I start up and/or check my controls. Bit tedious, that.

 

Another hypothetical solution would be to set 1 (up) to GMC and 1 (down) to both OFF and holding the cover closed, but I don't know if it's possible to double-bind like that with this utility.

Link to comment
Share on other sites

1 hour ago, An Actual Dragon said:

Is there a way to use this to set a master arm toggle on the F-5 (GMC switch to GMC or OFF, don't care about training mode)?

I've got a VPC control panel and would like to use the covered switch for that purpose, unfortunately the thing is 1/0/1 momentary and sends 1 (down) when the cover is closed, with the cover spring holding it in place.

I know that hypothetically I could use the Virpil command configuration software to set 1 (up) as a software toggle, then add GMC<>OFF, but that means I have to cycle the master arm twice every time I start up and/or check my controls. Bit tedious, that.

 

Another hypothetical solution would be to set 1 (up) to GMC and 1 (down) to both OFF and holding the cover closed, but I don't know if it's possible to double-bind like that with this utility.

I don't own a VPC control panel but I do use the flip down trigger on my VKB Gunfighter MCG Pro for this function so let me know if my understanding is correct

It sounds like the switch guard cover sends button down (1) when flipped down and button up (0) when flipped up, the switch underneath the guard acts like a single button that you need to hold and can't be pushed both ways with a center. You want to use the guard cover to control set GMC to GUNS MSL & CMR when flipped up and set to OFF when flipped down and the switch underneath won't be used since it only moves one way while you hold it so can't be used to set the GMC on/off (Otherwise you'd bind the VPC guard cover to control the DCS guard cover and use the switch underneath to control GMC like in the real cockpit).

You should be able to bind that in a vanilla DCS install without this mod required. For maybe a year now it's been possible to bind the _OFF state for buttons in the vanilla DCS install. So bind GMC Switch - OFF to JOYBTN## and bind GMC Switch - GUNS MSL & CMR to JOYBTN##_OFF and it should act how you want. The caveat is that you'll need to manually open the guard cover as part of your startup procecures, after that point however you shouldn't need to toggle things multiple times the VPC guard state should match the master arm state without having to set up an awkward software toggle.

Here is a screenshot of how I have mine configured for my VKB stick, the difference is that your _OFF bind will be swapped since with my setup down (1) is for armed, up (0) is for safe.

image.png


Edited by Quaggles
Link to comment
Share on other sites

1 hour ago, Quaggles said:

I don't own a VPC control panel but I do use the flip down trigger on my VKB Gunfighter MCG Pro for this function so let me know if my understanding is correct

It sounds like the switch guard cover sends button down (1) when flipped down and button up (0) when flipped up, the switch underneath the guard acts like a single button that you need to hold and can't be pushed both ways with a center. You want to use the guard cover to control set GMC to GUNS MSL & CMR when flipped up and set to OFF when flipped down and the switch underneath won't be used since it only moves one way while you hold it so can't be used to set the GMC on/off (Otherwise you'd bind the VPC guard cover to control the DCS guard cover and use the switch underneath to control GMC like in the real cockpit).

You should be able to bind that in a vanilla DCS install without this mod required. For maybe a year now it's been possible to bind the _OFF state for buttons in the vanilla DCS install. So bind GMC Switch - OFF to JOYBTN## and bind GMC Switch - GUNS MSL & CMR to JOYBTN##_OFF and it should act how you want. The caveat is that you'll need to manually open the guard cover as part of your startup procecures, after that point however you shouldn't need to toggle things multiple times the VPC guard state should match the master arm state without having to set up an awkward software toggle.

Here is a screenshot of how I have mine configured for my VKB stick, the difference is that your _OFF bind will be swapped since with my setup down (1) is for armed, up (0) is for safe.

image.png

 

That is somewhat correct (or else I'm the one with the misunderstanding now) - the guard cover itself sends no signal, but it physically locks the switch below it in the down position. That switch is momentary, returns to centre, and only signals on up/down.

Ideally, I would like the whole unit to behave as such:

  • Switch down (i.e. physical cover down) sends [GMC Cover DOWN] and [GMC Switch OFF] at the same time, so that flipping the physical cover down returns the in-game master arm to off and safe. This I don't know how to do.
  • Switch middle (i.e. physical cover up) sends [GMC Cover UP], so that flipping the physical cover up unsafes the in-game master arm. This I can do with BTN*_OFF, thanks to your advice.
  • Switch up (i.e. momentary) sends [GMC Switch GMC], so that just flipping it up once arms weapons. This is trivial, I know how to do this.

Failing that, anything to make the momentary-up toggle [GMC Switch ON/OFF] will do, because I already know how to bind the close-cover command.


Edited by An Actual Dragon
Link to comment
Share on other sites

OK, I've just checked my setup and I didn't manage this with normal/Quagles/custom binds as unlike some other modules you can't close the in game cover unless you first turn the in game switch off (in the F-14 flipping the in game cover knocks the switch to off as well) and the way Virpil toggles work by default.

....but you can add an extra 'button' using the VPC Config tool that then allows you to achieve it.

In the Virpil config add another DX button, set it to be activated by the same physical button as the toggle when pushed down and set it to mode 'press and hold'. So the control panel now send one button press when up and two when down (one set normal and one set 'p&h').

In my setup these are:

Toggle Up = BTN_26

Toggle Down Normal = BTN_25

Toggle Down P&H = BTN_54

And I map them like this:

image.png

Which means when I flip the cover up DCS opens the cover, when I then push the toggle up it then moves to armed, when I close the cover it first send the normal command to move to safe and then a moment later is sends the push & hold to close the cover/

 

Link to comment
Share on other sites

53 minutes ago, Trigati said:

OK, I've just checked my setup and I didn't manage this with normal/Quagles/custom binds as unlike some other modules you can't close the in game cover unless you first turn the in game switch off (in the F-14 flipping the in game cover knocks the switch to off as well) and the way Virpil toggles work by default.

....but you can add an extra 'button' using the VPC Config tool that then allows you to achieve it.

In the Virpil config add another DX button, set it to be activated by the same physical button as the toggle when pushed down and set it to mode 'press and hold'. So the control panel now send one button press when up and two when down (one set normal and one set 'p&h').

In my setup these are:

Toggle Up = BTN_26

Toggle Down Normal = BTN_25

Toggle Down P&H = BTN_54

And I map them like this:

image.png

Which means when I flip the cover up DCS opens the cover, when I then push the toggle up it then moves to armed, when I close the cover it first send the normal command to move to safe and then a moment later is sends the push & hold to close the cover/

 

That sounds pretty neat, I'll run it.

Edit: confirming setup is functional. Will consider binding similar to the other three covered switches I've got, where possible.


Edited by An Actual Dragon
Link to comment
Share on other sites

  • 3 weeks later...

I haven't needed to use the Input Command Injector Mod yet, but I've looked through various threads I could find and the Github documentation and can't find what I'm looking to do yet.  Here's my specific use case:  I have a TACAN control panel that adjusts the 10's and 1's channels through rotary switches.  DCS only has commands for increase/decrease for these controls.  What I'd like to do is have separate command inputs for each position of the rotary.  Which would be 13 buttons for the 10's and 10 for the 1's.  I can program clockwise and counter-clockwise rotations of the rotary to register as increase/decrease button presses, but I want the TACAN mechanical channel display to match what is in-game.  I can sync my panel with the game by running a full rotation of the dials, but it would be more convenient if I didn't have to do that every time.

Link to comment
Share on other sites

1 hour ago, FroznAK said:

I haven't needed to use the Input Command Injector Mod yet, but I've looked through various threads I could find and the Github documentation and can't find what I'm looking to do yet.  Here's my specific use case:  I have a TACAN control panel that adjusts the 10's and 1's channels through rotary switches.  DCS only has commands for increase/decrease for these controls.  What I'd like to do is have separate command inputs for each position of the rotary.  Which would be 13 buttons for the 10's and 10 for the 1's.  I can program clockwise and counter-clockwise rotations of the rotary to register as increase/decrease button presses, but I want the TACAN mechanical channel display to match what is in-game.  I can sync my panel with the game by running a full rotation of the dials, but it would be more convenient if I didn't have to do that every time.

Yup, that should be doable, but it depends on how the module was built. Like newer modules are usually really good at having relative and absolute controls available even if they dont always wire up both versions to the input files. Some of the older modules can be hit-or-miss with what commands are available.

I did a similar thing by request for the Mig-21 with the RSBN controls: https://github.com/Munkwolf/dcs-community-keybinds/blob/main/InputCommands/MiG-21bis/Input/MiG-21/joystick/default.lua#L180

But I havent done that for any TACAN controls that I remember. Which module(s)?

Using F-14 as example.. HB extends the joystick controls from the keyboard controls, where you'll find the TACAN controls in DCS\Mods\aircraft\F14\Input\F-14B-Pilot\keyboard\default.lua:

{down = device_commands.TACAN_Knob_Chnl_Tens_Step_Pilot, cockpit_device_id = devices.TACAN, value_down = 1, value_up = 0, name = _('TACAN Channel 10 Inc'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Tens_Step_Pilot, cockpit_device_id = devices.TACAN, value_down = -1, value_up = 0, name = _('TACAN Channel 10 Dec'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Ones_Step_Pilot, cockpit_device_id = devices.TACAN, value_down = 1, value_up = 0, name = _('TACAN Channel 1 Inc'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Ones_Step_Pilot, cockpit_device_id = devices.TACAN, value_down = -1, value_up = 0, name = _('TACAN Channel 1 Dec'), category = _('TACAN')},

See that 'Step'? Thats where its relative increase/decrease. To see all the TACAN commands available to wire-up, you have to go back a couple of folders to F14\Config\command_defs.lua:

TACAN_Knob_Chnl_Tens_Pilot = counter(),
TACAN_Knob_Chnl_Tens_Step_Pilot = counter(),
TACAN_Knob_Chnl_Ones_Pilot = counter(),
TACAN_Knob_Chnl_Ones_Step_Pilot = counter(),

There's the step ones, and non-step ones, which will/should be the absolute commands for the TACAN channels.

Then sometimes I'll check clickabledata.lua to see how the clickable cockpit version of that command is configured:

elements["PNT_TACAN_OUTER_TWIST_PILOT"] = multiposition_switch_limited(_("TACAN Channel Wheel (Tens)"), devices.TACAN, device_commands.TACAN_Knob_Chnl_Tens_Pilot, cockpit_args.TACAN_Dial_Outer_Pilot, 13, 1/12, false, 0)

13 options, each click changing by 1/12.. so then we'll end up with some lua like this for the absolute controls:

{down = device_commands.TACAN_Knob_Chnl_Tens_Pilot, cockpit_device_id = devices.TACAN, value_down = 0/12, name = _('TACAN Channel 10 - 0'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Tens_Pilot, cockpit_device_id = devices.TACAN, value_down = 1/12, name = _('TACAN Channel 10 - 1'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Tens_Pilot, cockpit_device_id = devices.TACAN, value_down = 2/12, name = _('TACAN Channel 10 - 2'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Tens_Pilot, cockpit_device_id = devices.TACAN, value_down = 3/12, name = _('TACAN Channel 10 - 3'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Tens_Pilot, cockpit_device_id = devices.TACAN, value_down = 4/12, name = _('TACAN Channel 10 - 4'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Tens_Pilot, cockpit_device_id = devices.TACAN, value_down = 5/12, name = _('TACAN Channel 10 - 5'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Tens_Pilot, cockpit_device_id = devices.TACAN, value_down = 6/12, name = _('TACAN Channel 10 - 6'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Tens_Pilot, cockpit_device_id = devices.TACAN, value_down = 7/12, name = _('TACAN Channel 10 - 7'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Tens_Pilot, cockpit_device_id = devices.TACAN, value_down = 8/12, name = _('TACAN Channel 10 - 8'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Tens_Pilot, cockpit_device_id = devices.TACAN, value_down = 9/12, name = _('TACAN Channel 10 - 9'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Tens_Pilot, cockpit_device_id = devices.TACAN, value_down = 10/12, name = _('TACAN Channel 10 - 10'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Tens_Pilot, cockpit_device_id = devices.TACAN, value_down = 11/12, name = _('TACAN Channel 10 - 11'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Tens_Pilot, cockpit_device_id = devices.TACAN, value_down = 12/12, name = _('TACAN Channel 10 - 12'), category = _('TACAN')},

Havent tested it yet but should work.

Then I would highly suggest using quaggles command injector. Then you'd drop that snippet into a lua file in your saved games dcs folder and not have to touch it again. Modifying the base game files you'd have to re-add it after each update, or use a mod manager to replace the base game file.. in which case you'd need to do the update again if the base game file changes.

I'll get these added this weekend to the community keybinds for the F-14 since I'm halfway there anyway, and if you have any other modules in mind let me know which ones and I'll take a look. I've been taking a break from the keybinds project and dcs in general, but got the flight rig set back up last weekend and am gonna start a refresh of the keybinds project soon. Mirage F1 and F15E keybinds are definitely in need of a refresh.

edit: one controls

{down = device_commands.TACAN_Knob_Chnl_Ones_Pilot, cockpit_device_id = devices.TACAN, value_down = 0/9, name = _('TACAN Channel 1 - 0'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Ones_Pilot, cockpit_device_id = devices.TACAN, value_down = 1/9, name = _('TACAN Channel 1 - 1'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Ones_Pilot, cockpit_device_id = devices.TACAN, value_down = 2/9, name = _('TACAN Channel 1 - 2'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Ones_Pilot, cockpit_device_id = devices.TACAN, value_down = 3/9, name = _('TACAN Channel 1 - 3'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Ones_Pilot, cockpit_device_id = devices.TACAN, value_down = 4/9, name = _('TACAN Channel 1 - 4'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Ones_Pilot, cockpit_device_id = devices.TACAN, value_down = 5/9, name = _('TACAN Channel 1 - 5'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Ones_Pilot, cockpit_device_id = devices.TACAN, value_down = 6/9, name = _('TACAN Channel 1 - 6'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Ones_Pilot, cockpit_device_id = devices.TACAN, value_down = 7/9, name = _('TACAN Channel 1 - 7'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Ones_Pilot, cockpit_device_id = devices.TACAN, value_down = 8/9, name = _('TACAN Channel 1 - 8'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Ones_Pilot, cockpit_device_id = devices.TACAN, value_down = 9/9, name = _('TACAN Channel 1 - 9'), category = _('TACAN')},

 


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

7 hours ago, Munkwolf said:

Yup, that should be doable, but it depends on how the module was built. Like newer modules are usually really good at having relative and absolute controls available even if they dont always wire up both versions to the input files. Some of the older modules can be hit-or-miss with what commands are available.

I did a similar thing by request for the Mig-21 with the RSBN controls: https://github.com/Munkwolf/dcs-community-keybinds/blob/main/InputCommands/MiG-21bis/Input/MiG-21/joystick/default.lua#L180

But I havent done that for any TACAN controls that I remember. Which module(s)?

Using F-14 as example.. HB extends the joystick controls from the keyboard controls, where you'll find the TACAN controls in DCS\Mods\aircraft\F14\Input\F-14B-Pilot\keyboard\default.lua:

{down = device_commands.TACAN_Knob_Chnl_Tens_Step_Pilot, cockpit_device_id = devices.TACAN, value_down = 1, value_up = 0, name = _('TACAN Channel 10 Inc'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Tens_Step_Pilot, cockpit_device_id = devices.TACAN, value_down = -1, value_up = 0, name = _('TACAN Channel 10 Dec'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Ones_Step_Pilot, cockpit_device_id = devices.TACAN, value_down = 1, value_up = 0, name = _('TACAN Channel 1 Inc'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Ones_Step_Pilot, cockpit_device_id = devices.TACAN, value_down = -1, value_up = 0, name = _('TACAN Channel 1 Dec'), category = _('TACAN')},

See that 'Step'? Thats where its relative increase/decrease. To see all the TACAN commands available to wire-up, you have to go back a couple of folders to F14\Config\command_defs.lua:

TACAN_Knob_Chnl_Tens_Pilot = counter(),
TACAN_Knob_Chnl_Tens_Step_Pilot = counter(),
TACAN_Knob_Chnl_Ones_Pilot = counter(),
TACAN_Knob_Chnl_Ones_Step_Pilot = counter(),

There's the step ones, and non-step ones, which will/should be the absolute commands for the TACAN channels.

Then sometimes I'll check clickabledata.lua to see how the clickable cockpit version of that command is configured:

elements["PNT_TACAN_OUTER_TWIST_PILOT"] = multiposition_switch_limited(_("TACAN Channel Wheel (Tens)"), devices.TACAN, device_commands.TACAN_Knob_Chnl_Tens_Pilot, cockpit_args.TACAN_Dial_Outer_Pilot, 13, 1/12, false, 0)

13 options, each click changing by 1/12.. so then we'll end up with some lua like this for the absolute controls:

{down = device_commands.TACAN_Knob_Chnl_Tens_Pilot, cockpit_device_id = devices.TACAN, value_down = 0/12, name = _('TACAN Channel 10 - 0'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Tens_Pilot, cockpit_device_id = devices.TACAN, value_down = 1/12, name = _('TACAN Channel 10 - 1'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Tens_Pilot, cockpit_device_id = devices.TACAN, value_down = 2/12, name = _('TACAN Channel 10 - 2'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Tens_Pilot, cockpit_device_id = devices.TACAN, value_down = 3/12, name = _('TACAN Channel 10 - 3'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Tens_Pilot, cockpit_device_id = devices.TACAN, value_down = 4/12, name = _('TACAN Channel 10 - 4'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Tens_Pilot, cockpit_device_id = devices.TACAN, value_down = 5/12, name = _('TACAN Channel 10 - 5'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Tens_Pilot, cockpit_device_id = devices.TACAN, value_down = 6/12, name = _('TACAN Channel 10 - 6'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Tens_Pilot, cockpit_device_id = devices.TACAN, value_down = 7/12, name = _('TACAN Channel 10 - 7'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Tens_Pilot, cockpit_device_id = devices.TACAN, value_down = 8/12, name = _('TACAN Channel 10 - 8'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Tens_Pilot, cockpit_device_id = devices.TACAN, value_down = 9/12, name = _('TACAN Channel 10 - 9'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Tens_Pilot, cockpit_device_id = devices.TACAN, value_down = 10/12, name = _('TACAN Channel 10 - 10'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Tens_Pilot, cockpit_device_id = devices.TACAN, value_down = 11/12, name = _('TACAN Channel 10 - 11'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Tens_Pilot, cockpit_device_id = devices.TACAN, value_down = 12/12, name = _('TACAN Channel 10 - 12'), category = _('TACAN')},

Havent tested it yet but should work.

Then I would highly suggest using quaggles command injector. Then you'd drop that snippet into a lua file in your saved games dcs folder and not have to touch it again. Modifying the base game files you'd have to re-add it after each update, or use a mod manager to replace the base game file.. in which case you'd need to do the update again if the base game file changes.

I'll get these added this weekend to the community keybinds for the F-14 since I'm halfway there anyway, and if you have any other modules in mind let me know which ones and I'll take a look. I've been taking a break from the keybinds project and dcs in general, but got the flight rig set back up last weekend and am gonna start a refresh of the keybinds project soon. Mirage F1 and F15E keybinds are definitely in need of a refresh.

edit: one controls

{down = device_commands.TACAN_Knob_Chnl_Ones_Pilot, cockpit_device_id = devices.TACAN, value_down = 0/9, name = _('TACAN Channel 1 - 0'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Ones_Pilot, cockpit_device_id = devices.TACAN, value_down = 1/9, name = _('TACAN Channel 1 - 1'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Ones_Pilot, cockpit_device_id = devices.TACAN, value_down = 2/9, name = _('TACAN Channel 1 - 2'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Ones_Pilot, cockpit_device_id = devices.TACAN, value_down = 3/9, name = _('TACAN Channel 1 - 3'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Ones_Pilot, cockpit_device_id = devices.TACAN, value_down = 4/9, name = _('TACAN Channel 1 - 4'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Ones_Pilot, cockpit_device_id = devices.TACAN, value_down = 5/9, name = _('TACAN Channel 1 - 5'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Ones_Pilot, cockpit_device_id = devices.TACAN, value_down = 6/9, name = _('TACAN Channel 1 - 6'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Ones_Pilot, cockpit_device_id = devices.TACAN, value_down = 7/9, name = _('TACAN Channel 1 - 7'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Ones_Pilot, cockpit_device_id = devices.TACAN, value_down = 8/9, name = _('TACAN Channel 1 - 8'), category = _('TACAN')},
{down = device_commands.TACAN_Knob_Chnl_Ones_Pilot, cockpit_device_id = devices.TACAN, value_down = 9/9, name = _('TACAN Channel 1 - 9'), category = _('TACAN')},

 

 

Wow, this is great. Thank you so much!  I have some more hardware testing to do before I can try it.  I wanted to confirm it was possible before getting the soldering iron out.  My intent is to use this with the A-10C II module, but in theory it could be used with any TACAN control.  I'm going to use a STM32 board and FreeJoy and bind the rotaries as axis-to-buttons.  Still proof of concept, but I think it will be doable.

Edit to add:  Looking through the default.lua files in DCS, it doesn't appear that the A-10 has absolute value commands available for the TACAN control.  I may not be looking in the right place.  Might have to change plans and use a Pro Mirco board and the joystick.h library to do what I want.


Edited by FroznAK
Add
Link to comment
Share on other sites

15 hours ago, FroznAK said:

Wow, this is great. Thank you so much!  I have some more hardware testing to do before I can try it.  I wanted to confirm it was possible before getting the soldering iron out.  My intent is to use this with the A-10C II module, but in theory it could be used with any TACAN control.  I'm going to use a STM32 board and FreeJoy and bind the rotaries as axis-to-buttons.  Still proof of concept, but I think it will be doable.

Edit to add:  Looking through the default.lua files in DCS, it doesn't appear that the A-10 has absolute value commands available for the TACAN control.  I may not be looking in the right place.  Might have to change plans and use a Pro Mirco board and the joystick.h library to do what I want.

 

You're welcome. Taking a quick glance, it does looks like the A-10 just has one set of controls for each TACAN channel control, but then kinda odd it looks like the tens one is relative and the ones one is absolute and looks like they are both relative and no absolute ones are available. But I'll dig into it more later. A-10 is one of the older modules where it's structured differently than newer ones.


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

On 2/8/2024 at 7:37 AM, Munkwolf said:

You're welcome. Taking a quick glance, it does looks like the A-10 just has one set of controls for each TACAN channel control, but then kinda odd it looks like the tens one is relative and the ones one is absolute and looks like they are both relative and no absolute ones are available. But I'll dig into it more later. A-10 is one of the older modules where it's structured differently than newer ones.

 

Bummer. Thank you for looking!

Link to comment
Share on other sites

  • 2 weeks later...
  • Recently Browsing   0 members

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