Jump to content

How to set up toggle switches (a tutorial)


Recommended Posts

Hi, is this method still in use for new modules?? because the diff file of the F-5 seems totally different to me...

This thread is essentially about the method where we add command definitions to the LUA files "default.lua" and their equivalents for specific HOTAS like the Warthog throttle. It works for all modules I know, including the F-5.

We do not modify the .diff files, and it's not recommended to edit those.

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

Currently to extend full flaps in the P-51, the pilot must toggle the FLAPS EXTEND switch 5 times. Is there any way to make the Warthog throttle FLAPS switch function like the Speedbrake switch, that is when the switch is toggled to the ON position, it continuously pulses FLAPS EXTEND commands until toggled off? I apologize in advance if I missed this issue in the 28 pages of this thread. Search yielded no results.

Hi Habu, I just realize there is an alternative: The P-51 module provides an axix command for the flaps. So if you have an unused slider on the throttle module you can bind that to the flaps. I do that with the Bf-109 module where I use the left throttle to control the flaps.

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

This thread is essentially about the method where we add command definitions to the LUA files "default.lua" and their equivalents for specific HOTAS like the Warthog throttle. It works for all modules I know, including the F-5.

We do not modify the .diff files, and it's not recommended to edit those.

 

Ok, thanks!

 

I found the the input file for the throttle in DCSopenalpha/Mods/Aircraft/F-5E/Input/F-5E/joystick/ and added this two lines under left vertical panel:

 

1- {combos = {{key = "JOY_BTN13"}}, down = jettison_commands.SelectJettSw, up = jettison_commands.SelectJettSw, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = 1.0, value_up = 0.0, name = _('Select Jettison Switch - SELECT POSITION/OFF'), category = {_('Left Vertical Panel')}},

 

2- {combos = {{key = "JOY_BTN14"}}, down = jettison_commands.SelectJettSw, up = jettison_commands.SelectJettSw, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = -1.0, value_up = 0.0, name = _('Select Jettison Switch - ALL PYLONS/OFF'), category = {_('Left Vertical Panel')}},

 

I want to be able to use the selective jettison/all pylons switch with the one of the warthog's 3 ways switches (I used buttons 13 and 14 for the file) but it doesnt seems to work...what am I doing wrong???

 

thanks guys!

Take a look at my MODS here

Link to comment
Share on other sites

Ok, thanks!

 

I found the the input file for the throttle in DCSopenalpha/Mods/Aircraft/F-5E/Input/F-5E/joystick/ and added this two lines under left vertical panel:

 

1- {combos = {{key = "JOY_BTN13"}}, down = jettison_commands.SelectJettSw, up = jettison_commands.SelectJettSw, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = 1.0, value_up = 0.0, name = _('Select Jettison Switch - SELECT POSITION/OFF'), category = {_('Left Vertical Panel')}},

 

2- {combos = {{key = "JOY_BTN14"}}, down = jettison_commands.SelectJettSw, up = jettison_commands.SelectJettSw, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = -1.0, value_up = 0.0, name = _('Select Jettison Switch - ALL PYLONS/OFF'), category = {_('Left Vertical Panel')}},

 

I want to be able to use the selective jettison/all pylons switch with the one of the warthog's 3 ways switches (I used buttons 13 and 14 for the file) but it doesnt seems to work...what am I doing wrong???

 

thanks guys!

The only thing that looks wrong at first glance is the double quote signs (")in the combo sections. I believe these must be single quote signs (').

To keep things simple I recommend to leave the "combo" part out altogether and instead bind the switches in the Options/Controls page. I will try on my system.

Edit:

I tried (without the "combo" section) and it works fine. Here is my code:

--added HWF 17-JAN-2017
{down = jettison_commands.SelectJettSw, up = jettison_commands.SelectJettSw, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = 1.0,	value_up = 0.0,	name = _('Select Jettison Switch - SELECT POSITION/OFF'),		category = {_('Left Vertical Panel')}},
{down = jettison_commands.SelectJettSw, up = jettison_commands.SelectJettSw, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = -1.0, value_up = 0.0, name = _('Select Jettison Switch - ALL PYLONS//OFF'), category = {_('Left Vertical Panel')}},

It's the same as yours without the "combo" bit. I bound JOY_BTN13 and JOY_BTN14 in Options/Controls.


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

Thanks for your help mate!!

 

About the double quotes, Im not sure what quotes are you refering to as the only ones I can see are the ones in the buttons: "JOY_BTN13" and "JOY_BTN14" and I just copied that from other lines in the code in the own file so could you tell me what are you refering??

 

Great its working for you!!!,I see in your second line you wrote: 'Select Jettison Switch - ALL PYLONS//OFF' , so, double "/", is that correct??I guess this would just affect the name but not sure... I will try in a while!!:thumbup:

 

Btw, I didnt said before that I ADDED these two lines to the file, so I didnt EDIT the existing ones...Im not sure if this is how I must do this??

 

I mean, this is how the default code looks like for the jettison front vertical panel:

 

-- Jettison System

{ down = jettison_commands.EmerAllJettCap, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = 1.0, name = _('Emergency All Jettison Button Cover - OPEN'), category = {_('Left Vertical Panel')}},

{ down = jettison_commands.EmerAllJett, up = jettison_commands.EmerAllJett, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = 1.0, value_up = 0.0, name = _('Emergency All Jettison Button'), category = {_('Left Vertical Panel')}},

{ down = jettison_commands.SelectJettBtn, up = jettison_commands.SelectJettBtn, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = 1.0, value_up = 0.0, name = _('Select Jettison Button'), category = {_('Left Vertical Panel')}},

{ down = jettison_commands.SelectJettSw_EXT, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = 1.0, name = _('Select Jettison Switch - Up'), category = {_('Left Vertical Panel')}},

{ down = jettison_commands.SelectJettSw_EXT, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = -1.0, name = _('Select Jettison Switch - Down'), category = {_('Left Vertical Panel')}},

{ down = jettison_commands.SelectJettSw, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = 1.0, name = _('Select Jettison Switch - SELECT POSITION'), category = {_('Left Vertical Panel')}},

{ down = jettison_commands.SelectJettSw, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = 0.0, name = _('Select Jettison Switch - OFF'), category = {_('Left Vertical Panel')}},

{ down = jettison_commands.SelectJettSw, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = -1.0, name = _('Select Jettison Switch - ALL PYLONS'), category = {_('Left Vertical Panel')}},

--

 

And this is what I did:

 

-- Jettison System

{ down = jettison_commands.EmerAllJettCap, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = 1.0, name = _('Emergency All Jettison Button Cover - OPEN'), category = {_('Left Vertical Panel')}},

{ down = jettison_commands.EmerAllJett, up = jettison_commands.EmerAllJett, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = 1.0, value_up = 0.0, name = _('Emergency All Jettison Button'), category = {_('Left Vertical Panel')}},

{ down = jettison_commands.SelectJettBtn, up = jettison_commands.SelectJettBtn, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = 1.0, value_up = 0.0, name = _('Select Jettison Button'), category = {_('Left Vertical Panel')}},

{ down = jettison_commands.SelectJettSw_EXT, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = 1.0, name = _('Select Jettison Switch - Up'), category = {_('Left Vertical Panel')}},

{ down = jettison_commands.SelectJettSw_EXT, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = -1.0, name = _('Select Jettison Switch - Down'), category = {_('Left Vertical Panel')}},

{ down = jettison_commands.SelectJettSw, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = 1.0, name = _('Select Jettison Switch - SELECT POSITION'), category = {_('Left Vertical Panel')}},

{ down = jettison_commands.SelectJettSw, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = 0.0, name = _('Select Jettison Switch - OFF'), category = {_('Left Vertical Panel')}},

{ down = jettison_commands.SelectJettSw, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = -1.0, name = _('Select Jettison Switch - ALL PYLONS'), category = {_('Left Vertical Panel')}},

{combos = {{key = "JOY_BTN13"}}, down = jettison_commands.SelectJettSw, up = jettison_commands.SelectJettSw, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = 1.0, value_up = 0.0, name = _('Select Jettison Switch - SELECT POSITION/OFF'), category = {_('Left Vertical Panel')}},

{combos = {{key = "JOY_BTN14"}}, down = jettison_commands.SelectJettSw, up = jettison_commands.SelectJettSw, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = -1.0, value_up = 0.0, name = _('Select Jettison Switch - ALL PYLONS/OFF'), category = {_('Left Vertical Panel')}},

--

 

Also, note that the names:

 

'Select Jettison Switch - SELECT POSITION/OFF'

 

and

 

'Select Jettison Switch - ALL PYLONS/OFF'

 

are non existent in the default file so I just created them...can I do that??

 

Thanks, really apreciate your help!!:thumbup:


Edited by watermanpc

Take a look at my MODS here

Link to comment
Share on other sites

Ok, now its working!!...what I was doing was wrong, you cant "ADD" lines but edit the existing ones...I just edited:

 

{ down = jettison_commands.SelectJettSw, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = 1.0, name = _('Select Jettison Switch - SELECT POSITION'), category = {_('Left Vertical Panel')}},

 

and

 

{ down = jettison_commands.SelectJettSw, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = -1.0, name = _('Select Jettison Switch - ALL PYLONS'), category = {_('Left Vertical Panel')}},

 

and now its working great!!

 

I will do this also for the left/right wintip sidewinders to be able to bind them to EAC/RDR buttons :thumbup:

Take a look at my MODS here

Link to comment
Share on other sites

Ok, now its working!!...what I was doing was wrong, you cant "ADD" lines but edit the existing ones...I just edited:

Sorry, but not to guide other people in the wrong direction. It is definetly possible to add lines to the code. I have a similar setup for this function and added the two lines

{down = jettison_commands.SelectJettSw, up = jettison_commands.SelectJettSw, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = 1.0,	value_up = 0.0, name = _('Select Jettison Switch Select/Off'), category = {_('_My Buttons')}},
{down = jettison_commands.SelectJettSw, up = jettison_commands.SelectJettSw, cockpit_device_id = devices.JETTISON_SYSTEM, value_down =-1.0,	value_up = 0.0, name = _('Select Jettison Switch All Pylons/Off'), category = {_('_My Buttons')}},

to my lua files ("default.lua", "Throttle - HOTAS Warthog.lua" and "Joystick - HOTAS Warthog.lua"). That works just fine. So whatever your problem was initially, it is not that you can't add the lines.

But anyway, great that it works now for you :thumbup:

A warrior's mission is to foster the success of others.

i9-12900K | MSI RTX 3080Ti Suprim X | 128 GB Ram 3200 MHz DDR-4 | MSI MPG Edge Z690 | Samung EVO 980 Pro SSD | Virpil Stick, Throttle and Collective | MFG Crosswind | HP Reverb G2

RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss

Link to comment
Share on other sites

Ooops!, sorry then!:doh: ...but I did exactly that and it didnt work, dont know why...

 

Btw, I noticed a weird behaviour after a while...for example, I moddified the battery ON position to be able to assing it to the APU switch in the throttle...start in ramp and everything works perfect but after a while flying I decided to land and when shutting down the battery (being the switch in the throttle UP and in the game in the ON position) it didnt work at first??:huh:...after moving the switch up and down again it worked, and tested it several times no problem :huh:...weird!

Take a look at my MODS here

Link to comment
Share on other sites

Hi Watermanpc,

1. You can add lines to the XYZ.lua file, but the text string in the "name" field must be unique. You did that right in your first version. I always add lines rather than overwriting existing ones, so I can always fall back to the original functionality.

2. You are right about the double-quote being legitimate.

3. I looked at your first version again in detail, but I saw nothing wrong. So I copied the two lines from your original post and pasted them into my TM WH throttle .lua file. And this works just fine!!!

Why it didn't work for you, I don't know. The only scenario I can think of is that you had not exited from the DCS 2.0.4 while you changed the .lua file. DCS seems to load all these files when it starts up. So any change you make while the program is exececuting will have no effect until you exit from the program and start it again.

4. About the battery switch not responding the first time, that's a common phenomenon in DCS. In many cases, the program just assumes the switch is OFF, until it has seen a change event. DCS has an option under "Misc":"Synchronize Cockpit Controls with HOTAS Controls at Mission Start". I recommend to check this option, although it does not work all the time.

If you activate the option, make sure all HOTAS switches are in the right position at mission start!!! I sometimes forget that and that can have nasty results, like the drag chute popping out during take-off...

5. The double slash in "ALL PYLONS//OFF" is just a typing error. It has no effect on functionality but it will appear just like that in Options/Controls.


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

Hi Watermanpc,

1. You can add lines to the XYZ.lua file, but the text string in the "name" field must be unique. You did that right in your first version. I always add lines rather than overwriting existing ones, so I can always fall back to the original functionality.

2. You are right about the double-quote being legitimate.

3. I looked at your first version again in detail, but I saw nothing wrong. So I copied the two lines from your original post and pasted them into my TM WH throttle .lua file. And this works just fine!!!

Why it didn't work for you, I don't know. The only scenario I can think of is that you had not exited from the DCS 2.0.4 while you changed the .lua file. DCS seems to load all these files when it starts up. So any change you make while the program is exececuting will have no effect until you exit from the program and start it again.

4. About the battery switch not responding the first time, that's a common phenomenon in DCS. In many cases, the program just assumes the switch is OFF, until it has seen a change event. DCS has an option under "Misc":"Synchronize Cockpit Controls with HOTAS Controls at Mission Start". I recommend to check this option, although it does not work all the time.

If you activate the option, make sure all HOTAS switches are in the right position at mission start!!! I sometimes forget that and that can have nasty results, like the drag chute popping out during take-off...

5. The double slash in "ALL PYLONS//OFF" is just a typing error. It has no effect on functionality but it will appear just like that in Options/Controls.

 

 

thanks for your detailed explanation mate!!:thumbup:

 

1- Ok, I'll do it. I just copied the original file so I can try different things and/or go default again. Btw, I guess as soon as you repair/update DCS these files will be restored right??

 

2- ok.

 

3- Maybe it has to be with my buttons assignations in game...I mean, I already binded buttons 13 and 14 to other functions, just used these because they were the only ones remaining for 3 positions but Im not sure...Also, I know you must to close the game (or any aplication) to be able to let it load again all files but good point :thumbup:

 

4- Good point also, but again I was already aware about that and had the option Synchronize Cockpit Controls enabled...the problem is that it didnt failed at start but after a while of flying AND after being already used in that flight. I have tested a bit more and it happens every single time with this button/assignation :huh:...

 

For example, I have edited the file to bind the upper switches of the throttle (fuel flow)to enable/disable the ext fuel tanks...once I enable them in game I disable them after a long time no problems, they work just fine...but for some reason the battery switch doesnt after a while.

 

It only fails ONCE, I mean that as soon as I disable and enable it works perfect, just like when you dont have the synchronization option enabled. Of course, its not a problem with the way the button works, I mean is not like when you bind the switch to an ON/OFF asignation where you have to enable and disable the switch twice...it works AS A SWITCH, up=on, down=off but for some reason, after a while (or maybe after doing something I cant realize) it doesnt work at first (in this case to shut off the battery) but as soon as I switch to on and off again it works and after that it works no problems...very weird :huh:

 

Also, not a problem with the switch itself, as I have tested it in gaming devices and TARGET software no problems.

 

5-Ok, just as I though :)

 

I have attached the file I edited to enable switches for jettison, ext fuel tanks, battery and wingtips sidewinders...I did the changes to the "on" position only so you know what you have to bind. Maybe some of you guys can test it and see if it works for you, specially the battery switch.

 

Another question I have is...is there any common file for inputs between 1.5 and 2.0?? I ask this because I decided to copy this file in the 1.5 folder to be able to use it with 1.5 also but once in the 1.5 I noticed that some assignations where mixed with the 2.0...also in 2.0 some asignation where in red colour because they where mixed with the ones I had in 1.5 so there must be something in common right??

 

thanks guys!!

Throttle - HOTAS Warthog.lua

Take a look at my MODS here

Link to comment
Share on other sites

Hi watermanpc,

1. Yes DCS restores the original the .LUA files each time you run the update or a repair. I therefore use the free OvGME program that a forum member from France has developed. This allows me to enable/disable my modified files and prevents loss of my changes.

4. I looked for the battery switch in your file but cannot see what line is changed by you, as you have not added any comment. Anyway the problem is not in the .LUA file. It seems to be a bug in DCS. I have the same problem with the APU switch in my throttle, when I use it to enable MW50 in the FW-190 D4. It seems that the programs "forgets" to scan this switch at mission start.

5. You cannot be sure that the files will be the same. From one version to the next, there can be changes in the default files, and if you back up your modified files and restore them after the update, then you will "lose" these changes. This is important to know when DCS changes or adds functionality. In that case you have to copy your added lines and paste them into the new default files. This is quite likely to happen in "young" modules. It is therefore important that you clearly mark every added line so that you can easily find it. I always precede the added line(s) with something like this:

-- added 2 lines below XYZ 18-DEC-2018

(XYZ is for my initials)

I am considering to copy all added lines per .LUA file into a separate .lua files so if and when necessary I can copy them into a new .LUA file "en bloc".


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

Hi watermanpc,

1. Yes DCS restores the original the .LUA files each time you run the update or a repair. I therefore use the free OvGME program that a forum member from France has developed. This allows me to enable/disable my modified files and prevents loss of my changes.

4. I looked for the battery switch in your file but cannot see what line is changed by you, as you have not added any comment. Anyway the problem is not in the .LUA file. It seems to be a bug in DCS. I have the same problem with the APU switch in my throttle, when I use it to enable MW50 in the FW-190 D4. It seems that the programs "forgets" to scan this switch at mission start.

5. You cannot be sure that the files will be the same. From one version to the next, there can be changes in the default files, and if you back up your modified files and restore them after the update, then you will "lose" these changes. This is important to know when DCS changes or adds functionality. In that case you have to copy your added lines and paste them into the new default files. This is quite likely to happen in "young" modules. It is therefore important that you clearly mark every added line so that you can easily find it. I always precede the added line(s) with something like this:

-- added 2 lines below XYZ 18-DEC-2018

(XYZ is for my initials)

I am considering to copy all added lines per .LUA file into a separate .lua files so if and when necessary I can copy them into a new .LUA file "en bloc".

 

Many thanks LeCuvier!!:thumbup: really apreciated!!

 

I use JSGME so will use it to enable/disable my .lua. The problem is, as you said, if they make changes to these files...damn!!, it would be soooo easy if they (ED, BST, LN, etc.) would do this for us :cry:...it would take a few minutes and we wont need to change files.

 

About the battery switch I guess its a bug yeah...I tried several times and all happened the same. Connect the battery when in ramp no problems, then made my flight and after landing I try to shut off the battery...doesnt work :doh:...ok, turn it on again and then off...it works. After that it works fine all the times. I guess the solution is to when in ramp cold start enable and disable battery several times :D.

 

The rest of switches work great.

 

Sorry for not adding a comment in the edited lines. The ones I edited are:

 

{ down = jettison_commands.SelectJettSw, up = jettison_commands.SelectJettSw, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = 1.0, value_up = 0.0, name = _('Select Jettison Switch - SELECT POSITION'), category = {_('Left Vertical Panel')}},

 

{ down = jettison_commands.SelectJettSw, up = jettison_commands.SelectJettSw, cockpit_device_id = devices.JETTISON_SYSTEM, value_down = -1.0, value_up = 0.0, name = _('Select Jettison Switch - ALL PYLONS'), category = {_('Left Vertical Panel')}},

 

{ down = electric_commands.BatterySw, up = electric_commands.BatterySw, cockpit_device_id = devices.ELEC_INTERFACE, value_down = 1.0, value_up = 0, name = _('Battery Switch - BATT'), category = {_('Right Vertical Panel')}},

 

{ down = fuel_commands.ExtFuelTransfer_Cl,up = fuel_commands.ExtFuelTransfer_Cl, cockpit_device_id = devices.FUEL_INTERFACE, value_down = 1.0,value_up = 0.0, name = _('Ext Fuel Cl Switch - ON'), category = {_('Right Vertical Panel')}},

 

{ down = fuel_commands.ExtFuelTransfer_Pylon,up = fuel_commands.ExtFuelTransfer_Pylon,cockpit_device_id = devices.FUEL_INTERFACE, value_down = 1.0,value_up = 0.0, name = _('Ext Fuel Pylons Switch - ON'), category = {_('Right Vertical Panel')}},

 

{ down = weapons_commands.WingtipLeft_Select, up = weapons_commands.WingtipLeft_Select, cockpit_device_id = devices.WEAPONS_CONTROL, value_down = 1.0,value_up = 0.0, name = _('Armament Position Selector Switch (LEFT WINGTIP) - ON'), category = {_('Left Vertical Panel')}},

 

{ down = weapons_commands.WingtipRight_Select,up = weapons_commands.WingtipRight_Select, cockpit_device_id = devices.WEAPONS_CONTROL, value_down = 1.0,value_up = 0.0, name = _('Armament Position Selector Switch (RIGHT WINGTIP) - ON'), category = {_('Left Vertical Panel')}},

Take a look at my MODS here

Link to comment
Share on other sites

Hi guys,

I was trying to do this for the ka-50, So I added my lines in the default.lua. but I can't use the line to assign a joystic or throttle button ?

 

Should I modify the Joystick - HOTAS Warthog.lua ? why do I have to modify that one ? with the MIG21 I only had to modify default.lua

Link to comment
Share on other sites

Some aircraft support special joysticks like the Warthog others don't. If they don't there will be only a default.lua, which is used for all input devices.

And yes, for the KA-50 you have to modify the "Joystick - HOTAS Warthog.lua" and the "Throttle - HOTAS Warthog.lua" if you have a Warthog.

A warrior's mission is to foster the success of others.

i9-12900K | MSI RTX 3080Ti Suprim X | 128 GB Ram 3200 MHz DDR-4 | MSI MPG Edge Z690 | Samung EVO 980 Pro SSD | Virpil Stick, Throttle and Collective | MFG Crosswind | HP Reverb G2

RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss

Link to comment
Share on other sites

  • 3 weeks later...

Hey Guys!

It might be a little off topic, but this is the only thread a found concerning editing lua files to make custom controls work. So here we go ;)

Can anybody help me with adjusting the sensitiviy of the pressed_ event setting HSI Course and Heading? As long as a pressed call is used, it jumps 5-12 degrees at a time which is useless. Changing the event to up_ lets me control it in one degree steps, as there ist no event buffering, it unfortunately takes a minute to make a 180 degree turn.

Any idea or workaround would be highle appreciated ;)

 

Greetz

Mirco

Win 10 Pro 64 - i6700K @ 4.7GHz - MSI 1080ti Gaming X OC - 32 GB DDR4 Fury X - 1x 512GB 960 Pro SSD - 1x 512GB 850 Pro SSD - TM Cougar - TM Warthog - MHG Crosswind - Rift CV1 - Track IR 5

Link to comment
Share on other sites

Never mind, found it ;) . Anybody having issues with leobodnar boards and HIS rotary encoder control just contact me ;)

thanks anyway

Win 10 Pro 64 - i6700K @ 4.7GHz - MSI 1080ti Gaming X OC - 32 GB DDR4 Fury X - 1x 512GB 960 Pro SSD - 1x 512GB 850 Pro SSD - TM Cougar - TM Warthog - MHG Crosswind - Rift CV1 - Track IR 5

Link to comment
Share on other sites

  • 3 weeks later...
Never mind, found it ;) . Anybody having issues with leobodnar boards and HIS rotary encoder control just contact me ;)

thanks anyway

Lucky me. I have just received today a leobodnar board and I intend to use rotary encoders for a variety of controls.

 

How did you fixed that?

 

Thanks in advance

Link to comment
Share on other sites

It may have been asked before, but I haven't been able to find it.

 

How can I configure the canopy switch to perform similar to the aircraft one?

The aircraft has an (ON)-NONE-(ON) (momentary switch in the up and down directions), but as seen in the lua file it is treated as a toggle switch:

 

{down = iCommandPlaneFonar, name = _('Canopy Open/Close'), category = _('Systems')},

 

I am building a panel for that switch and would like to use it as close to the real thing as possible.

Link to comment
Share on other sites

It may have been asked before, but I haven't been able to find it.

 

How can I configure the canopy switch to perform similar to the aircraft one?

The aircraft has an (ON)-NONE-(ON) (momentary switch in the up and down directions), but as seen in the lua file it is treated as a toggle switch:

 

{down = iCommandPlaneFonar, name = _('Canopy Open/Close'), category = _('Systems')},

 

I am building a panel for that switch and would like to use it as close to the real thing as possible.

Not clear about the definition of ON-NONE-ON. Is it something like "Up = Open / Down = Close" or the opposite?

What aircraft?


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

Not clear about the definition of ON-NONE-ON. Is it something like "Up = Open / Down = Close" or the opposite?

What aircraft?

ON-NONE-ON is the nomenclature for a switch that has 3 positions. Maybe if I say UP-NONE-DOWN would be clearer :thumbup:

 

(ON)-NONE-(ON) means up and down positions need to be manually held, or they will return to the NONE position.

Link to comment
Share on other sites

ON-NONE-ON is the nomenclature for a switch that has 3 positions. Maybe if I say UP-NONE-DOWN would be clearer :thumbup:

 

(ON)-NONE-(ON) means up and down positions need to be manually held, or they will return to the NONE position.

 

You didn't answer: what plane? I need to know in order to check what's possible (assuming I have that one)

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 checked across all of my modules; but they either use their own command codes for "Canopy Open" and "Canopy Close" (which don't work in other planes), or they use the common command code "iCommandPlaneFonar" which is a ON/OFF toggle.

So unfortunately I have not been able to find something that works with 3-position toggle switches.

The only thing I've been able in a similar case was to use a 2-position ON/OFF switch for such a toggle command.

It's a pity that in this case ED hasn't modelled the command to match the real cockpit witch.

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...

M2k Toggle Debacle

 

Ive been beating my head trying to get a few switches in my pit to work for the Mirage. Namely the Alternator 1 and 2 switches. The particular board im using is a desktop aviator 2235 which pulse generates a signal when the switch is flipped. Unfortunately ive tried to write new code in the default.lua but cannot get it to perform a simple on/off function. For example, i can bind a button to "Alternator 1 OFF" and get the switch in game to go off but cannot use the same to flip the switch on. does anyone have any idea what i could be missing.

 

code ive tried as follows....

 

 {down = 3522, up = 3522, cockpit_device_id = 8, value_down= 1, value_up = 0, name = _('Alternator 1 Toggle'), category = _('Electrical')},

 

Ive also tried adding a 1 to the up state in the diff.lua for this particular usb device.

 

["d3522pnilu3522cd8vd0vpnilvu1"] = {
		["added"] = {
			[1] = {
				["key"] = "JOY_BTN14",
			},
		},
		["name"] = "Alternator 1 OFF",

 

The battery Toggle performs as desired but the code is an icommand which is easy to add up and down statements to make them perform as needed.

 

Any help would be appreciated.

Win 10 Pro - Intel I7 12700k@4.9ghz water cooled - ASUS TUF Z690 -EVGA RTX 3080 12G Hybrid - EVGA 1000W PSU - 32GB 3200 G-Skill XMP- Reverb G2 -Custom mip and side panels - Leo Bodnar  BBI32x2, BBI64x4 - TM Warthog HOTAS - TM Cougar MFD's x 3 - TM TPR pedals

Link to comment
Share on other sites

  • Recently Browsing   0 members

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