Jump to content

Recommended Posts

Posted

Hello !

 

In advance please accept my apologies for my terrible English, but I'm French.

 

I was wondering why some buttons can be mouse clicked, but can't be mapped from the menu.

 

By example : in the sensor panel I can click on Flir, Ltd and Lst buttons, but I can't choose to affect keyboard buttons..

 

Another example : some buttons have 2 positions but can only be mapped as a single keyboard button (Hook bypass, launch bar...).

 

If you have any explanation or help I would be grateful as I currently build a F/A 18 cockpit for DCS.

 

Best regards.

Posted

Ton anglais est assez clair!

I believe that these switches on the sensor panel have no function yet because the related systems are not yet implemented. That's certainly the case for the FLIR and the LTD (assuming that means Laser Target Designator). I have no idea what the LST/NFLR is but I assume that's the same situation.

About these 2-position switches in the cockpit that can only be bound to pushbutton-like switches, I agree that's ugly to say the least.

I had already added a few true 2-position switch commands to the "default.lua", and based on your post I explored the hook bypass and launch bar switches.

Here are my additions to the "default.lua" with the hook bypass and launch bar switches at the end:

{down = SMS_commands.MasterArmSw, up = SMS_commands.MasterArmSw, cockpit_device_id = devices.SMS, value_down =  1.0, value_up = 0.0, name = _('Master Arm Switch 2-Pos ARM/SAFE'), category = {_('Instrument Panel'), _('Master Arm Panel')}},
{down = hotas_commands.THROTTLE_EXTERIOR_LIGTHS, up = hotas_commands.THROTTLE_EXTERIOR_LIGTHS,    cockpit_device_id = devices.HOTAS,    value_down =  1.0, value_up = 0.0,    name = _('Exterior Lights 2-Pos ONOFF'), category = {_('Throttle Grip'), _('HOTAS')}},
{down = gear_commands.HookHandle, up = gear_commands.HookHandle, cockpit_device_id = devices.GEAR_INTERFACE, value_down =  1.0, value_up =  0.0, name = _('Arresting Hook Handle 2-Pos UP/DOWN'), category = {_('Right Vertical Panel')}},
{down = HUD_commands.HUD_AltitudeSw, up = HUD_commands.HUD_AltitudeSw, cockpit_device_id = devices.HUD,    value_down =  1.0, value_up =  0.0, name = _('Altitude Switch 2-Pos BARO/RADAR'), category = {_('Instrument Panel'), _('HUD Control Panel')}},
{down = cpt_commands.CanopySwitchClose, up = cpt_commands.CanopySwitchOpen, cockpit_device_id = devices.CPT_MECHANICS, value_down =  -1.0, value_up = 1.0, name = _('Canopy Control Switch 2-Pos OPEN/CLOSE'), category = {_('Right Wall'), _('Systems')}},
{down = oxygen_commands.OBOGS_ControlSw, up = oxygen_commands.OBOGS_ControlSw, cockpit_device_id = devices.OXYGEN_INTERFACE, value_down =  1.0,    value_up = 0.0,    name = _('OBOGS Control Switch 2-Pos ON/OFF'), category = {_('Left Console')}},
{down = cptlights_commands.HookBypass, up = cptlights_commands.HookBypass,    cockpit_device_id = devices.CPT_LIGTHS,    value_down =  -1.0,    value_up = 1.0,    name = _('Hook Bypass 2-Pos Switch CARRIER/FIELD/CARRIER'), category = {_('Left Vertical Panel')}},
{down = gear_commands.LaunchBarSw, up = gear_commands.LaunchBarSw, cockpit_device_id = devices.GEAR_INTERFACE, value_down =  1.0, value_up = -1.0,    name = _('Launch Bar Control 2-Pos Switch EXTEND/RETRACT'), category = {_('Left Vertical Panel')}},

The added code lines must be entered after this line (line 7):

join(res.keyCommands,{ 

and before this line (around line 92):

})

For editing the "default.lua" you should use the free Notepad++.

It's a good idea to use OvGME (by Sedenion) or the old JvGME to manage this kind of mods!

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

Posted

Also single buttons are sometimes not programmable.

 

Example: MasterModeButtons A/A and A/G.

Default they have been assigned to 1 and 2 (keyboard top row).

If i tap these keys on the keyboard (or mouseclick the button), they work in the cockpit. But there is no way i can program them to my HOTAS.

In the key-tester they show up right and the output is correct but the sim doesn't recognize them. And this is an implemented system.

Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind pedals, TrackIR4, Rift-S, Elgato Streamdeck XL.

Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!

Posted
Also single buttons are sometimes not programmable.

Example: MasterModeButtons A/A and A/G.

Default they have been assigned to 1 and 2 (keyboard top row).

If i tap these keys on the keyboard (or mouseclick the button), they work in the cockpit. But there is no way i can program them to my HOTAS.

In the key-tester they show up right and the output is correct but the sim doesn't recognize them. And this is an implemented system.

I have had the F/A-18Csince it became available, and from the beginning I've had the A/A and A/G master modes bound to pushbuttons on my button box, and they have always worked. If you cannot bind them to buttons on your HOTAS then something is wrong in your installation.

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

Posted

If i bind the buttons directly from the HOTAS onto the Thurstmaster part of the controls it works to, no problem with that. It's a work around i use for the moment.

 

But i can't make it work in programmed mode, at least not for those two.

All of my other programmed buttons work fine.

However, the HOTAS itself is not the problem because in the A-10C they both perform just right. The F/A-18C is the only one in which they don't, from programmed mode that is.

Outside DCS F/A-18C it works fine too, whatever i program onto them is generated when i press them. So there's something in the interface between the two that doesn't work. I already removed the keyboard and joystick diff.lau files and rebuild them from scratch, no joy.

Still looking for a cause....

Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind pedals, TrackIR4, Rift-S, Elgato Streamdeck XL.

Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!

Posted (edited)
If i bind the buttons directly from the HOTAS onto the Thurstmaster part of the controls it works to, no problem with that. It's a work around i use for the moment.

 

But i can't make it work in programmed mode, at least not for those two.

....

What do you mean by "programmed mode"?

Do you mean via a Thrustmaster T.A.R.G.E.T profile?

I don't normally use Target because my only TM control is the WH throttle. However, I just tested using Mic Switch Up and Mic Switch Down to emulate keyboard keys "1" and "2" using "Hold" mode, and that worked perfectly to set A/A mode and A/G mode.

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

Posted

Programmed mode is through Thrustmaster Foxy, the pre-runner of T.A.R.G.E.T.

They are programmed to the dogfight switch on the Cougar's throttle. Works fine on every module i use but not on the F/A-18.

Works fine on say Notepad to, if i open Notepad and activate the throttle, press the button and there are the generated characters. So i know the output is OK. But DCS doesn't recognise them, for F/A-18C that is.

Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind pedals, TrackIR4, Rift-S, Elgato Streamdeck XL.

Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!

Posted
Programmed mode is through Thrustmaster Foxy, the pre-runner of T.A.R.G.E.T.

They are programmed to the dogfight switch on the Cougar's throttle. Works fine on every module i use but not on the F/A-18.

Works fine on say Notepad to, if i open Notepad and activate the throttle, press the button and there are the generated characters. So i know the output is OK. But DCS doesn't recognise them, for F/A-18C that is.

That's really strange. When I bind these commands through a Target profile they work. And I suppose the principle is the same. So if it works with Target and not with Foxy, there must be something different between these programs. Anyway, I'm out of my depth here.

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

Posted

It works with both, T.A.R.G.E.T. and Foxy, just not with the dogfight switch and only in the F/A-18 module.

It has to do with the top row numbers on the keyboard (AZERTY) outputted by the HOTAS software not being propherly recognised by the F/A-18C module.

If i re-assign those funtions to other keys on the keyboard it does work.

Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind pedals, TrackIR4, Rift-S, Elgato Streamdeck XL.

Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!

Posted (edited)

That's another twist to the problem, because on the AZERTY keyboard you have to shift the number keys in the top row in order to get numbers. My keyboard is QWERTZ (German) so even with T.A.R.G.E.T I might have the same problem if I used a French keyboard. I do have a French keyboard somewhere, maybe I can try that.

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

Posted
If i re-assign those funtions to other keys on the keyboard it does work.

It only works in the controls section, not in the actual game....:huh:.

I re-assigned Master_Mode_Buttons AA and AG to "LSHF m" and "LCTL m" in the controls section and in Foxy.

If i download that profile into the HOTAS and then go into the DCS F/A-18C controls and press the buttons on the HOTAS accordingly, they jump to that particular control. So the DCS F/A-18 control sections recognizes the throttle buttons alright. But ingame, it does nothing. If i press the same combo on the keyboard, it jumps to the right control in the F/A-18 controls section but also works ingame setting the desired Master Modes.

Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind pedals, TrackIR4, Rift-S, Elgato Streamdeck XL.

Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!

Posted (edited)

I'm lazy but I'm also curious. So I connected my AZERTY keyboard and re-created the TARGET profile for the A/A and A/G commands, using the top row "&" and "é" keys for 1 and 2.

In my first test it seemed to work correctly in Commans/Options but didn't work in flight. I realized that the default mode in TARGET is "Pulse" which only emulates an extremely short key press.

So I modified the TARGET profile to set both to "Hold" mode. This keeps the emulated key depressed as long as you hold the HOTAS button down. With this setting it worked like a charm.

I suspect that this might be what causes your problem. I don't know the Foxy scripting language but I guess somehow you must make sure that the signal has sufficient duration. Bonne chance!

And now I can re-connect my QWERTZ keyboard thank God!

Edit:

So the problem is not related to using an AZERTY keyboard. With a US QWERTY keyboard would have the same problem. I looked into the "default.lua" and these two single-function commands are a bit different from what I saw in other modules, in that they have both a "value_down" and a "value_up" argument. Normally you would only expect that structure with 2-state commands like ON/OFF.

And a fair number of single-function commands in the F/A-18C have this structure. All of these probably require that you use the "Hold" mode in TARGET.

Actually, when you look closely at the A/A and A/G buttons on the cockpit you see that the button is depressed all the way down when you push the button down on the HOTAS (= value_down), and it goes up just a little bit when you release the HOTAS button (value_up).

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

Posted

The Hold function is not good since it's a switch instead of a button.

It stays in the same position once it's put there until i put it in another position.

The hold mode would be active as long as the switch is in the AA mode position and that's not what i want because together with the position, i use another button to go through the AA weapon options or through the AG weapon options.

Ex:

 

So if the dogfight switch is in upper position, it should activate AA mode and button X should walk me through the AA weapons each time i press it.

 

 

If the dogfight switch is in the down position it should activate the AG mode and then button x should walk me through the AG weapons each time i press it.

 

 

Going from up to down or from down to up passes through the middle position which should then deactivate either AA or AG mode and put the system back into NAV mode.

 

 

Actually it's like this:

 

 

BTN T7 /P Master_Mode_Button-AA /R Master_Mode_Button-AA Rem A-A mode

BTN T8 /P Master_Mode_Button-AG /R Master_Mode_Button-AG Rem A-G mode

 

BTN S2 /U /I Gun_Trigger-SECOND_DETENT_Press_to_shoot

............../O /T Select_AMRAAM /T Select_Sparrow /T Select_Sidewinder /T Select_Gun

.........../M /I Rem NAV mode

.............../O Rem NAV mode

.........../D /I Weapon_Release_Button Rem A-G weapons

.............../O Rem not programmed yet

 

BTN T7 is the dogfight switch in the up position

BTN T8 is the dogfight switch in the down position

The /P /R statements stand for Press-Release so if i put the switch in the up position, T7 is activated the /P comes into play and the system goes into Master Mode A-A. If i then put the switch back into the middle position, the /R comes into play and the Master Mode A-A is pressed again which puts the system back into NAV mode. Same for the T8 switch but then on the down position.

 

 

The position of the T7/T8 is checked if the BTN S2 is pressed.

The /U is true if the T7/T8 is up, the /M is true if it's in the middle and the /D is true if it's in the down position (the /I and /O depends on what state S3 is but that's not the problem).

 

 

This idee works out fine in my A-10C profile but not in the F/A-18C.

 

 

Now, the that it works with the hold command and not without made me think a bit further and i looked up some stuff in Foxy's help files. Sometimes, sims, because of complexity, are not fast enough to detect keyboard change or input from a HOTAS, certainly if a statement generates only a single key-press.

And that seems to be the case here in the F/A-18C module. If i add an extra few key presses with a delay it works although i have to find a sweetspot on the delay part because sometimes it works, and sometimes it doesn't.

Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind pedals, TrackIR4, Rift-S, Elgato Streamdeck XL.

Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!

Posted
The Hold function is not good since it's a switch instead of a button.

It stays in the same position once it's put there until i put it in another position.

I don't know about Foxy, but in TARGET (I quote the manual): "Hold simulates pressing and holding the keyboard keys until the button is released".

What you describe is defined as "Press" in TARGET.

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

Posted (edited)

It's the same in Foxy but in this case the hold statement doesn't work because the button you talk about is not a button but a switch.

If it would be a button, you're right.

But it's a switch which has defined (read fixed) positions.

If you press a button it stays in that state until released.

If you press the switch, it stays in that position until pressed again (or until you put it in another position, depending on the hardware of the switch.) With other words, you can release it and it still stays in that position. The Hold statement would still be generating key-presses....

 

I can make it work with a button and the hold statement but that's not what i want. I want to put the switch in a certain position and keep it there.

For that i can't use a hold statement.

 

Also, if you run some more tests, you'll run into another problem since the hold statement in this case (pressing the A-A mode button in the cockpit) comes with an uncertainly because because you'll never know in what state your program will leave the button.

 

Example:

Say the Master_Mode_Button-AA = activated by key-press "1" and deactivated by the same key-press "1".

This cause problems because the hold statement will generate an x number of "1" in a row (like 111111111111111). If uneven, it will end up activate the Master_Mode_Button-AA, if uneven, it will end up with a de-activated. Master_Mode_Button-AA. That's not a good solution.

 

 

In my case:

Setting the T7 in the up position should press the Master_Mode_Button-AA once in the cockpit, lighting it up.

Setting it back in the middle position should press the Master_Mode_Button-AA again, de-activating it.

This doens't work, probably because of DCS skipping inputs. One press should be enough but is't in this case.

Edited by Lange_666

Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind pedals, TrackIR4, Rift-S, Elgato Streamdeck XL.

Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!

Posted

@Lange: do whatever you want. I'm out.

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

Posted

No worries, i'll keep searching (it works fine in other modules so the same should work in the F/A-18 module).

I'll use the direct method (assigning the switches through the control setup in DCS) for now. My own profile is still under development and doesn't need to be so complex for things i do right now.

Win11 Pro 64-bit, Ryzen 5800X3D, Corsair H115i, Gigabyte X570S UD, EVGA 3080Ti XC3 Ultra 12GB, 64 GB DDR4 G.Skill 3600. Monitors: LG 27GL850-B27 2560x1440 + Samsung SyncMaster 2443 1920x1200, HOTAS: Warthog with Virpil WarBRD base, MFG Crosswind pedals, TrackIR4, Rift-S, Elgato Streamdeck XL.

Personal Wish List: A6 Intruder, Vietnam theater, decent ATC module, better VR performance!

  • Recently Browsing   0 members

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