Configure virtual weapon selector HAT

Moderator: AdminGroup

Tommy544
Posts: 3
Joined: Sun May 16, 2021 15:18
Been thanked: 1 time

Configure virtual weapon selector HAT

Postby Tommy544 » Sun May 16, 2021 15:38

Hi everyone,

I was reading the manual for VKBDevCfg and I stumbled upon a section 4.3.3. RadioButton. In the provided example in this section it is explained how to use the radio buttons as weapon selector, basically selecting what weapon should the trigger fire. I am not sure whether this functionality is supposed to be supported by the VKB firmware alone or whether this functionality relies on the game supporting toggling weapons.

What I am trying to configure:
I am flying IL-2 Great Battles sim and in it, I fly a plane that has both bombs and rockets loaded. The sim only provides button mappings for bomb release and rocket release and no controls like toggle select bombs or toggle select rockets (even though some of the planes had such switches in real life). Basically, I would like to configure a RadioButton group to let's say a thumb HAT on MCG grip and depending on which weapon I select by this HAT switch, the trigger would then send a different logical button press to the game to release that weapon.

Just to provide a concrete example of what I want: I push the thumb HAT to the left, nothing happens, but in the joystick firmware, bombs were selected and prepared for the trigger. Afterwards, I press the trigger and a bomb is released. Next, I push the thumb HAT to the right. Again, nothing happens, but internally, rockets were selected and prepared for the trigger. Now, when I press the trigger, a rocket is fired.

Is it possible to configure such simulated weapon selector HAT in the VKBDevCfg without the sim/game supporting mappings for weapon toggle? I haven't found a way how to modify the logical output of a button (trigger) based on the state of some other other (radio) buttons.

Thanks!

Drano
Posts: 313
Joined: Sun Oct 01, 2017 5:00
Location: Representin' the 302
Has thanked: 20 times
Been thanked: 86 times

Re: Configure virtual weapon selector HAT

Postby Drano » Sun May 16, 2021 22:25

I have one of my hats dedicated to weapons in IL2 . Without having it in front of me it's the low center hat. It goes like this: press left cycles number of rockets to fire(single, pair, all), press right cycles the bombs (right, left, both). Press forward fires rockets, back drops bombs. I think center press is jettison.

I have a two stage trigger and I keep that dedicated to the guns.
Gunfighter MkI w/MkIII update + MCG-Pro Grip
Avia S Cams
2x #30A Springs
FW:v2.13F
Devconfig: v92.78
Zbootloader: v2.01

Asus Strix X570-E Gaming
Ryzen9 5800X3D
Asus Strix 3080 12GB
32GB Corsair Vengeance PC3600
EVGA G6 1000W
Reverb G2V2
Win10/64

Tommy544
Posts: 3
Joined: Sun May 16, 2021 15:18
Been thanked: 1 time

Re: Configure virtual weapon selector HAT

Postby Tommy544 » Sun May 16, 2021 23:16

I have actually managed to figure out a way to do it. I am able to get the exact behavior as I described in my first post.

Image

Image

1. I set two buttons as RadioButtons. In my case they are thumb HAT left and thumb HAT right (19 and 20 on physical layer) and set one of them master. You could also add a third button that would be SAFE position. In my case, I changed the logical button presses of the radio buttons to buttons 52 and 53. I think this is not necessary and should work with the default mapping.
2. I am using my folding trigger pull button to either drop bombs or fire rockets based on the radio buttons. The physical button for my folding trigger pull is 24. Set No Function for the logical layer for this button, as this button only activates the binary buttons defined in step 3 and doesn't fire any button presses by itself.
3. We need to define 2 Binary buttons, one for each weapon. You can see them in the screenshot on the Reg#7 line. They both use AND operand and they fire when both the flip down trigger physical button is pressed and when the logical button of the corresponding radio button is pressed. These Binary buttons will then fire logical buttons 49 and 51 respectively and that is what you will map in-game.

It does work exactly as what I described in the first post as my wanted behavior. In case something is not clear, just reply to this thread :)


Return to “Manuals and Howtos”

Who is online

Users browsing this forum: No registered users and 30 guests