Jump to content

Adding USB Keypads


Recommended Posts

I've been trying to figure out cheap and easy controller/button setup to use the A-10C UFC and various cockpit functions without trying to pan around the cockpit with my rickety old TrackIR 3 and trying to click the right button while watching where I'm flying and shooting etc. What I've come up with is this - using one or two or three of these:

 

http://www.amazon.com/Cubeternet-Portable-Numeric-KeyPad-Keyboard/dp/B002XNJGRA/ref=sr_1_49?s=electronics&ie=UTF8&qid=1287365961&sr=1-49

 

and mapping the various controls to the buttons. Does anyone know if this would work? Or would it be recognized as just another keypad? Or recognized at all?

 

Thanks for any suggestions.

Stupid thermals...

Link to comment
Share on other sites

I bought this: http://cgi.ebay.com/Genovation-USB-MICROPAD-630-NUMERIC-KEYPAD-630-/360302001671?pt=PCA_Mice_Trackballs&hash=item53e3ac3e07#ht_970wt_1141

 

I plan to use it to generate key strokes, which I will assign via options. This unit is programmable and comes with intuitive software. Note that the UFC (and the MFD's un;less you have the Cougar units) cannot be assigned keystrokes in this beta, but this should be an option in final release, or even the next beta update.

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

I think you can make key assignments for the MFD's... all you have to do is copy the asisgnemts from MFD lua file and paste them into keyboard.lua (or for another controler) and those commands will be there

No longer active in DCS...

Link to comment
Share on other sites

sure thing... the two files in WinRAR archive are LUA files for MFD controlers (naming is different, I just renamed them to easier see which one is which). All you have to do is Copy / Paste (use Notepad++) from each file bits like this one:

 

[1] =

{

["combos"] =

{

[1] =

{

["key"] = "JOY_BTN1",

["reformers"] =

{

}, -- end of ["reformers"]

}, -- end of [1]

}, -- end of ["combos"]

["up"] = 982,

["name"] = "Left MFCD OSB 01",

["category"] = "Left MFCD",

["down"] = 642,

}, -- end of [1]

Into Keyboard.lua file

 

When you load the game and go into keyboard commands, they will be available there also.. you can then chose key combo ir button/switch for each, same as for any other command


Edited by Kuky

No longer active in DCS...

Link to comment
Share on other sites

Thank you so much Kuky for your example. A few clarification, the joy buttons you have in the file. How do I tell DCS which device is that for? I read for OC, SOIC will show the device number. What if I am using the BU0836 or some other USB plug in cards? How will I be able to tell the device number for other cards?

 

Then after that do I just add the device number to device.lua? Even then how does DCS know that these joy buttons added for the left and right MFCDs are for this new device, and not my X52 which also have joy buttons etc?

Link to comment
Share on other sites

ok... here's how it should work...

 

1. connect USB controller such as BU0836 and change something in input setting so game recognises it

2. quit game and look into /Config/Input/Aircraft/A-10C/Joystick (I'm at work now so not 100% sure the folder names) and there you'll find your USB controller LUA file.

3. Open the files I attached and copy/paste just the commands into LUA file of the new controller (you'll probably have to edit sequence numbers so they are not conflicting)

4. go back into game and check input commands for that controller... the new ones you copied should now be listed in there as well and you can assign them

 

Basically... once you have game recognise USB controller (such as any joystick of Cougar MFDs or BU0836 etc) they get new LUA file in Input folder and each has its own list of commands. For Cougar MFD's for example, by default you cannot assign gun trigger command... but if you copy those lines from keyboard.lua and paste into Cougar MFD lua then you can assign gun trugger to any button on Cougar MFD... am I making sense?

No longer active in DCS...

Link to comment
Share on other sites

Also, you can do same thing with FC2... for example.. Su-33 has refuling probe but Su-27 does not... what I could do is copy the command from Su-33 keyboard.lua for refuling probe and paste it into Su-27 keyboard.lua and now refuling probe command will be listed for Su-27 keyboard commands list... it won't work of course as Su-27 does not have refuling probe, but the command will be there anyway... this is just to show the idea... you can add or remove commands you want to any lua file.

 

The game sees any USB controller as separate device.. you could have connected 2 TM Cougar HOTAS and they will get separate ID's... and each will have its own column in Input settings in game.

 

On my end I have

TM Cougar HOTAS

TM Cougar MFD's

BU0836

 

there are 4 USB devices total... in game in Input settings I can assign gun trigger to any and/or all of them... the thing is, with default MFD.lua files you can't assign any MFD button to anything other then MFD OSB buttons in game... but if I copy some commands from keyboard.lua into it, then I can. I have for example copied landing gear up and down and Flaps up and down commands from keyboard.lua and added them to Left Cougar MFD and I use that to raise/lower gear and flaps (I hate to use keyboard and I find anoying to have to move left hand to hold the stick while I fly to get the mouse to click in cockpit... sorry to write so much... I hope you get my point :D)

No longer active in DCS...

Link to comment
Share on other sites

Kuky you are amazing. If you are girl I'd kiss you! :D

 

No you don't write too much. I'm grateful for your detailed explanation. Ever since I was told that the only way to control switches that don't have keyboard commands assigned (which is a lot of them!) is to use LUA, I've been trying to piece together the mystery of LUA without much luck. I've asked several people for help. they have given me links here and there, but mostly related to SOIC, but since I haven't bought the OC cards yet I can't try that approach.

 

Now with this newfound info I'd give my BU0836 and another old input card a try, just to see if I can control any of the switches. I've made prototype panels and switches for many of the left and right consoles. I was waiting for something like this to let me control those toggles, buttons, pots, encoders etc. Like you I really hate using the keyboard, or mouse clicks.

 

This is awesome! Thank you sir!

Link to comment
Share on other sites

I use BU0836 also and I have found some stuff does not work even when I assign the commands. The autopilot works, and I set 2x 2-way switches to start/shut off engines... but I have also assigned 3 switches to turn lights on in cockpit, nav lights and landing gear long/short but they don't work... I'm thinking its maybe because lot of stull is not done yet and it's still a beta.

 

I would like to build someting like UFC pannel but these commands are not listed in game... yet I hope

No longer active in DCS...

Link to comment
Share on other sites

Is the UFC not in clickabledata.lua? If so you can do what you taught me above. I have not paid much attention to the switches and button in the front console yet. I am eager to try your info on my left and right console.

 

So many switches! Does anyone know how much switches are there on the A10C? Seems like more than the F-16.

Link to comment
Share on other sites

Son of a gun, it works!

 

My first pin on the BU0836 was acting up. When wired up, it lights up on the controllers screen, but when let go 2 lights up! Anyway I tried wiring to last pin instead and changed your code to JOY_BTN12. Testing on the controller lights up fine. Then in the DCS it shows up as JOY_BTN12 too, and also created a new category Left MFCD. Fired up the game and pressed my push button and it clicked on the OSB1. Cool!

 

Just two more questions.

1. Why did you get the numbers UP = 982, DOWN = 642 etc? I checked several possible lua files and couldn't find them. I'm trying to learn how to add these stuff for other switches on the panels, so I need to know how you came up with the numbers.

 

2. Do you know how to create a matrix for the BU0836 with diodes? If so any pictures? Right now I'm limited to the 12 default pins.

 

Thanks again!

Link to comment
Share on other sites

1. Why did you get the numbers UP = 982, DOWN = 642 etc? I checked several possible lua files and couldn't find them. I'm trying to learn how to add these stuff for other switches on the panels, so I need to know how you came up with the numbers.

 

I didn't do anything, these are probably assigned by game engine. For Left MFD I added last 4 commands (216, 221, 220 and 217 which are landing gear and flaps up/down)

 

2. Do you know how to create a matrix for the BU0836 with diodes? If so any pictures? Right now I'm limited to the 12 default pins

 

Gatting wiring out from the matrix is bit tricky... I used a small PCB and just wired out each pin to 6 points (it gets messy) then taken out wires from each... basically I created a row of 6 cables from 1... then wired out to each switch. For how to wire diodes (you really should make every switch with diode) and you can use this as referrence

 

6x6.png

No longer active in DCS...

Link to comment
Share on other sites

Is the UFC not in clickabledata.lua? If so you can do what you taught me above. I have not paid much attention to the switches and button in the front console yet. I am eager to try your info on my left and right console.

 

So many switches! Does anyone know how much switches are there on the A10C? Seems like more than the F-16.

 

I found UFC section in clickabledata.lua so it should be able to get them assigned to switches/buttons only I don't know how I could add them into keyboard.lua command list... guess wait till ED does it cause I don't think I could figure it out myself so not even gonna try:book:

No longer active in DCS...

Link to comment
Share on other sites

I didn't do anything, these are probably assigned by game engine. For Left MFD I added last 4 commands (216, 221, 220 and 217 which are landing gear and flaps up/down)

 

I guess you got it from having the physical TM MFD itself? I don't have it that is probably why I didn't find this lua file in the input/joystick folder or anywhere else. Just like the BU0836, once you plug in something new it detects it esp. after you change something to it in DCS like you said.

 

Well, I was hoping to figure out next how to take those things in clickabledata.lua like the fuel system control panel and put it into the BU0836 lua. Since you can't figure out how to do it for the UFC, I am stuck too. We'd have to wait till ED adds keyboard commands to these. If somehow they decide not to since there are hundreds of switches, then I'd go the SOIC route. I think they at least add keyboard commands to input intensive panels like the MFCD, UFC, and CDU. I think these are a must. The others are good to have.

Link to comment
Share on other sites

I had a crack last night and tried to add Master Arm, TGP and laser switch to BU0836 but to no success. I guess if ED don't decide to at least add these and UFC buttons to keyboard commands we are stuck with using the mouse for these... hope they do it

No longer active in DCS...

Link to comment
Share on other sites

Currently very few keyboard commands have been assigned to Avionics switches. A lot went to views, cockpit views, external views, hotas, communication etc. A few in Systems category like gear, flap, open canopy. no switches on panels! and we have so many panels! Hopefully the next beta update includes some keyboard commands. Swinging my head and trying hold it steady with the trackir to do mouse click on the switches is not easy.

Link to comment
Share on other sites

I read Oakes' post guiding Steilios on how to set up SOIC and LUA seems very clear and logical. I guess that is the way to go, the proven I/O solution for DCS series. Are you planning to get OC cards Kuky? You can get away without it for inputs using lots of BU0836X or Hagstrom, but you'd need OC for output stuff like LED, LCD and 7 segment displays.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

It's here: <DCS_Install_Dir>\Scripts\Aircrafts\A-10C\Cockpit

 

I am looking to get the UFC(ICP) and CDU buttons mapped to my CH Products MFP. It looks like it might be a little ... complicated :)

Fridge

----------

Things which do you no good in aviation:

1) Altitude above you;

2) Runway behind you;

3) Fuel in the truck;

4) The airspeed you don't have.

Link to comment
Share on other sites

I'm taking a look at the F16 MFD1.lua file and the clickabledata.lua file, trying to find a common bridge between them with regard to the Left MFCD configuration but I can not see them talking the same language. It seems that there is no common naming between the two that could allow me to create a custom lua file that would allow me to interface with the UFC through a device (my CH Products MFP to be specific).

 

What I was hoping to see was a common name for the button that would hint at the underlying mechanism in the A-10 code.

 

Am I crazy?

Fridge

----------

Things which do you no good in aviation:

1) Altitude above you;

2) Runway behind you;

3) Fuel in the truck;

4) The airspeed you don't have.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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