Toggle Switch for Altitude Select - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 10-11-2018, 06:43 AM   #1
Scotch75
Member
 
Scotch75's Avatar
 
Join Date: Nov 2011
Location: Perth, Western Australia
Posts: 130
Default Toggle Switch for Altitude Select

Hey Folks,

I'm trying to map the Altitude Select (BARO/RDR) function in the F18 to thr RDR ALTM switch on the TM Warthog Throttle, which is JOY_BTN25. This does not appear in the Special Keys section.

Would someone be able to walk me through this please? I'm ok editing .lua files, but I have no idea what to copy and paste into where etc... eg, Saved Games structure or the game installation structure.

Muchly appreciated
__________________
W10 Home 64Bit, Intel Skylake I5 6600K 3.50GHz, ASUS ROG Stryx Z270F MoBo, 32GB G.Skill RipJaws V DDR4 3200 RAM, Samsung 960 Pro 512GB M.2 SSD (OS), Samsung 850 Pro 512GB SSD, 2TB Seagate SDHD, 2TB WD Green HDD, GALAX GTX GeForce 1070 EXOC Sniper White 8GB VRAM
Scotch75 is offline   Reply With Quote
Old 10-11-2018, 02:26 PM   #2
LeCuvier
Senior Member
 
Join Date: May 2013
Location: South of France
Posts: 1,032
Default

I'm using this line of code with JOY_BTN25:
Code:
{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')}},
You need to add it to the file "default.lua" in the folder "...\Eagle Dynamics\DCS World\Mods\aircraft\FA-18C\Input\FA-18C\joystick".
I recommend you insert it just below this line which is at the beginning of the file:
Code:
"join(res.keyCommands,{"
It's recommended to use a program like OvGME to manage this kind of mods. This will allow you to move the modified file out before an update and move it back in after the update. If you don't use OvGME (or JvGME) you will have to re-do the modification after every update or repair.
__________________
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
LeCuvier is offline   Reply With Quote
Old 10-11-2018, 02:57 PM   #3
Scotch75
Member
 
Scotch75's Avatar
 
Join Date: Nov 2011
Location: Perth, Western Australia
Posts: 130
Default

Quote:
Originally Posted by LeCuvier View Post
I'm using this line of code with JOY_BTN25:
Code:
{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')}},
You need to add it to the file "default.lua" in the folder "...\Eagle Dynamics\DCS World\Mods\aircraft\FA-18C\Input\FA-18C\joystick".
I recommend you insert it just below this line which is at the beginning of the file:
Code:
"join(res.keyCommands,{"
It's recommended to use a program like OvGME to manage this kind of mods. This will allow you to move the modified file out before an update and move it back in after the update. If you don't use OvGME (or JvGME) you will have to re-do the modification after every update or repair.
Many thanks LeCuvier. I'm still a little confused. I looked at that file earlier and found the 3 coded lines that pertain to this Altitude Select button further down, it seemed to exist in the file (although maybe not exactly as you have typed above). Or is that just the file DCS reads to display it in the options GUI page?

Sorry for my lack of understanding
__________________
W10 Home 64Bit, Intel Skylake I5 6600K 3.50GHz, ASUS ROG Stryx Z270F MoBo, 32GB G.Skill RipJaws V DDR4 3200 RAM, Samsung 960 Pro 512GB M.2 SSD (OS), Samsung 850 Pro 512GB SSD, 2TB Seagate SDHD, 2TB WD Green HDD, GALAX GTX GeForce 1070 EXOC Sniper White 8GB VRAM
Scotch75 is offline   Reply With Quote
Old 10-11-2018, 04:06 PM   #4
LeCuvier
Senior Member
 
Join Date: May 2013
Location: South of France
Posts: 1,032
Default

Quote:
Originally Posted by Scotch75 View Post
Many thanks LeCuvier. I'm still a little confused. I looked at that file earlier and found the 3 coded lines that pertain to this Altitude Select button further down, it seemed to exist in the file (although maybe not exactly as you have typed above). Or is that just the file DCS reads to display it in the options GUI page?

Sorry for my lack of understanding
These 3 lines provide commands for push buttons. The first one toggles the switch ON/OFF/ON.... etc each time you push the button. The 2nd and 3rd lines go together and require 2 push buttons: One for Baro and one for Radar.
The line I added is for use with a maintained ON/OFF switch like the switch RDR ALTM on the WH throttle. The switch in the UP position will select Barometric and in the down position it will select Radar as source for the altitude indication.
__________________
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
LeCuvier is offline   Reply With Quote
Old 10-11-2018, 11:56 PM   #5
Scotch75
Member
 
Scotch75's Avatar
 
Join Date: Nov 2011
Location: Perth, Western Australia
Posts: 130
Default

Quote:
Originally Posted by LeCuvier View Post
These 3 lines provide commands for push buttons. The first one toggles the switch ON/OFF/ON.... etc each time you push the button. The 2nd and 3rd lines go together and require 2 push buttons: One for Baro and one for Radar.
The line I added is for use with a maintained ON/OFF switch like the switch RDR ALTM on the WH throttle. The switch in the UP position will select Barometric and in the down position it will select Radar as source for the altitude indication.
So the line you provided is in addition to those already in the file and over-rides them in the GUI?
__________________
W10 Home 64Bit, Intel Skylake I5 6600K 3.50GHz, ASUS ROG Stryx Z270F MoBo, 32GB G.Skill RipJaws V DDR4 3200 RAM, Samsung 960 Pro 512GB M.2 SSD (OS), Samsung 850 Pro 512GB SSD, 2TB Seagate SDHD, 2TB WD Green HDD, GALAX GTX GeForce 1070 EXOC Sniper White 8GB VRAM
Scotch75 is offline   Reply With Quote
Old 10-12-2018, 01:34 AM   #6
Scotch75
Member
 
Scotch75's Avatar
 
Join Date: Nov 2011
Location: Perth, Western Australia
Posts: 130
Default

Ok, I inserted that line into the default.lua, all it did was make all of the device bindings disappear in the Options/Controls GUI under F/A-18C Sim tab. I couldn't find the new line in the list of commands.
__________________
W10 Home 64Bit, Intel Skylake I5 6600K 3.50GHz, ASUS ROG Stryx Z270F MoBo, 32GB G.Skill RipJaws V DDR4 3200 RAM, Samsung 960 Pro 512GB M.2 SSD (OS), Samsung 850 Pro 512GB SSD, 2TB Seagate SDHD, 2TB WD Green HDD, GALAX GTX GeForce 1070 EXOC Sniper White 8GB VRAM
Scotch75 is offline   Reply With Quote
Old 10-12-2018, 01:51 AM   #7
Scotch75
Member
 
Scotch75's Avatar
 
Join Date: Nov 2011
Location: Perth, Western Australia
Posts: 130
Default

Ahhh.... ok, I got it to work.

Thanks again LeCuvier, greatly appreciated.

Cheers!
__________________
W10 Home 64Bit, Intel Skylake I5 6600K 3.50GHz, ASUS ROG Stryx Z270F MoBo, 32GB G.Skill RipJaws V DDR4 3200 RAM, Samsung 960 Pro 512GB M.2 SSD (OS), Samsung 850 Pro 512GB SSD, 2TB Seagate SDHD, 2TB WD Green HDD, GALAX GTX GeForce 1070 EXOC Sniper White 8GB VRAM
Scotch75 is offline   Reply With Quote
Old 10-12-2018, 08:51 AM   #8
LeCuvier
Senior Member
 
Join Date: May 2013
Location: South of France
Posts: 1,032
Default

Quote:
Originally Posted by Scotch75 View Post
Ahhh.... ok, I got it to work.

Thanks again LeCuvier, greatly appreciated.

Cheers!
If you want to get a deeper understanding of what we are doing here, you may want to look at the how-to document posted here: https://forums.eagle.ru/showpost.php...&postcount=214
__________________
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
LeCuvier is offline   Reply With Quote
Old 10-13-2018, 06:13 AM   #9
Scotch75
Member
 
Scotch75's Avatar
 
Join Date: Nov 2011
Location: Perth, Western Australia
Posts: 130
Default

Downloaded..... Great info in there.

Many thanks
__________________
W10 Home 64Bit, Intel Skylake I5 6600K 3.50GHz, ASUS ROG Stryx Z270F MoBo, 32GB G.Skill RipJaws V DDR4 3200 RAM, Samsung 960 Pro 512GB M.2 SSD (OS), Samsung 850 Pro 512GB SSD, 2TB Seagate SDHD, 2TB WD Green HDD, GALAX GTX GeForce 1070 EXOC Sniper White 8GB VRAM
Scotch75 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 05:06 AM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.