Jump to content

How to set up toggle switches (a tutorial)


Recommended Posts

You must have pasted in the wrong place and thereby caused a syntax violation. You must paste within the block for key commands...

 

I always paste the commands in the keyCommands block so I know that. Maybe its better to have it at the bottom of the block.

-royphsle

 

F-16C:thumbup:

i7-4790 CPU 3.60GHz | 16 GB RAM | MSI GTX-960 Gaming 4GB | TM Warthog HOTAS | MFG Crosswind Pedals | TrackIR 5

Link to comment
Share on other sites

  • 3 weeks later...

Sorry if this has been addressed recently but I have been searching for hours and can't find any recent mention.

 

I am trying to get the Rdr Altm switch on the throttle to work for the BARO/RDR switch in the F-18. I have it working properly, but my problem is that it doesn't sync properly at startup. I starts on BARO everytime. After switching it up and down it will sync up and work properly, but that kind of defeats the purpose intended.

 

My EAC and Flaps switches both sync up perfectly everytime.

 

I have seen mentions to this sort of problem, but never a solution. ll the case that there is no way to fix this issue or is the solution eluding me?

 

Thanks

Sim Rig: Intel i7 9700k, SSD, GTX1660Ti, 32 GB DDR4, Windows 10

HOTAS: TM Warthog, MFG Crosswind Pedals, Opentrack - DIY HeadTracker

IRL: Private Pilot - IFR, Part 107 Drone Pilot

Link to comment
Share on other sites

@Panda: this is an old issue which may be difficult to solve. Switches that are in the ON position at mission start will synchronize well. But if they are in the OFF position at mission start you have to switch them to ON once before they synchronize. I have that switch in the ON = Baro position at mission start and synchronization works fine.

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

@LeCuvier - Yes this is the situation I am facing, and I have seen posts about the issue from years ago. I was hoping it had been solved and I just couldn't locate the solution.

 

The thing I find odd is that other switches like Flaps and EAC sync no matter what position are in so it seems like it is possible to have it work correctly.

 

It is not a "big" deal, but certainly frustrating when you know it can work the right way.

 

Thanks

Sim Rig: Intel i7 9700k, SSD, GTX1660Ti, 32 GB DDR4, Windows 10

HOTAS: TM Warthog, MFG Crosswind Pedals, Opentrack - DIY HeadTracker

IRL: Private Pilot - IFR, Part 107 Drone Pilot

Link to comment
Share on other sites

Hello guys!

 

I'm trying to invert the EAC switch on Warthog for landing gear. Curently when I switch EAC up gear goes down and when EAC down the gear is up. I''d like to have them opposite. Could you help me?

 

My current code in default.lua:

 

{ down = iCommandPlaneGear, up = iCommandPlaneGear, cockpit_device_id = devices.GEAR_INTERFACE, value_down = -1.0, value_up = 1.0, name = _('Landing Gear Control Handle - UP/DOWN 2-Pos'), category = {_('Left Vertical Panel')}},

{ down = iCommandPlaneGear, name = _('Landing Gear Control Handle - UP/DOWN'),


Edited by Bloody
Link to comment
Share on other sites

I am still a student of this. Have you tried reversing the values -1.0 and 1.0?

 

 

Sent from my iPad using Tapatalk

 

HI!

 

I tried each combinations with 1.0, - 1.0 and 0.

 

I also tried to insert a filter "invert=true" in file in Saved games folder. Nothing works... I'm afraid that the solution is so simple that we will be ashamed :D

Link to comment
Share on other sites

Hello guys!

 

I'm trying to invert the EAC switch on Warthog for landing gear. Curently when I switch EAC up gear goes down and when EAC down the gear is up. I''d like to have them opposite. Could you help me?

 

My current code in default.lua:

 

{ down = iCommandPlaneGear, up = iCommandPlaneGear, cockpit_device_id = devices.GEAR_INTERFACE, value_down = -1.0, value_up = 1.0, name = _('Landing Gear Control Handle - UP/DOWN 2-Pos'), category = {_('Left Vertical Panel')}},

{ down = iCommandPlaneGear, name = _('Landing Gear Control Handle - UP/DOWN'),

You are not telling us which aircraft this is for. So I cannot test what I think.

 

However, I did a search across all the modules I have and I did not see any case where the "iCommandPlaneGear" uses the value_down and/or value_up expressions. Normally the iCommandPlaneGear command toggles between UP and DOWN.

For the F/A-18C I have created this line of code to do exactly what you want:

{down = iCommandPlaneGearUp, up = iCommandPlaneGearDown, name = _('Landing Gear Control Handle 2-Pos UP/DOWN'),    category = {_('Left Vertical Panel')}},

That same line would probably work with some other aircraft as well, but the "Category" should be changed of course.

Going forward, please make sure you indicate which aircraft you are looking at!

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

Hello again!

 

I have another question. Is it possible to bind 3-pos switch in the bottom right corner of Warthog throttle to A/A and A/G mode in such a way that when I switch (up or down) mode is ON and when im switching back to the center position it goes OFF? Currently I need to double switch to turn it OFF.

 

BR

AG

Link to comment
Share on other sites

Hello again!

I have another question. Is it possible to bind 3-pos switch in the bottom right corner of Warthog throttle to A/A and A/G mode in such a way that when I switch (up or down) mode is ON and when im switching back to the center position it goes OFF? Currently I need to double switch to turn it OFF.

 

BR

AG

No, these commands are implemented as 2 mechanically independent spring-loaded pushbuttons with some logic behind them. I actually tried a few tricks but could not fool the software.

I use 2 pushbuttons on my DSD Button Box for these commands.

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

  • 2 weeks later...

I am currently flying the hornet and having some issues with creating toggles. Ive created something for my Master Arm, but these two don't look to have the code in the default lua for the toggle.

 

I would like to have toggles with warthog switches for

 

Flashlight

NVG goggles activation

Kneeboard Pop up

 

I am looking to NOT have to use the toggle twice... Anyone already solved these? I did some searches but nothing is popping up.

:pilotfly: Specs: I9-9900k; ROG Strix RTX 2080ti; Valve Index HMD; 32GB DDR4 3200 Ram; Samsung 970 EVO 1TB SSD; TM Warthog with pedals, 3 TM MFDs

Link to comment
Share on other sites

Ok. Got the goggles working...

 

Having issues with Flashlight, Kb pop, and Hook bypass. I can get the switch to work with up once for on up again for off configuration that is default, but none of them work as a toggle.

 

Any ideas for the F-18?

:pilotfly: Specs: I9-9900k; ROG Strix RTX 2080ti; Valve Index HMD; 32GB DDR4 3200 Ram; Samsung 970 EVO 1TB SSD; TM Warthog with pedals, 3 TM MFDs

Link to comment
Share on other sites

Here is what I use for the Hook Bypass switch:

{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 FIELD/CARRIER'), category = {_('Left Vertical Panel')}},

As to the flashlight, I have no idea what it is used for. I suppose you mean the command that is bound to LAlt + L. I found that it triggers the command 3256 and created this command for a 2-Pos ON/OFF switch:

{down = 3256, up = 3256, cockpit_device_id = 0,    value_down =  -1.0,    value_up =  0.0, name = _('Flashlight 2-Pos ON/OFF'), category = {_('View Cockpit'), _('Right Console')}},

As far as I can see it works.

As to the Kneeboard, I suppose you want to use a maintained 2-Pos ON/OFF switch to toggle between SHOW and HIDE. That is easily achieved by binding the existing command "Kneeboard glance view" to a maintained ON/OFF switch.

If those commands don't do what you are looking for, please provide a more specific description of your requirements.

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

Just to confirm, as I want to set this up for some bindings in the F-15, if I make the changes in the 'saved games' input then it won't get overwritten in a patch correct ?

The relevant "default.lua" has to be in the game folder. A modified "default.lua" copied to "...\Saved Games\DCS.openbeta\Config\Input\Bf-109K-4\joystick" has no effect. I just tested this again to see if it has changed, but unfortunately it hasn't.

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

@LeCuvier - Thank you sir! You got all of my issues resolved! Both code snippets work great and the suggestion for the KB worked like a charm.

 

Thanks again!

:pilotfly: Specs: I9-9900k; ROG Strix RTX 2080ti; Valve Index HMD; 32GB DDR4 3200 Ram; Samsung 970 EVO 1TB SSD; TM Warthog with pedals, 3 TM MFDs

Link to comment
Share on other sites

  • 2 weeks later...

Just did this for the F18 : HMD off (knob fully left) or ON (fully right)

 

 

 

{down = hmd_commands.BrtKnob_AXIS, up = hmd_commands.BrtKnob_AXIS, cockpit_device_id = devices.HMD_INTERFACE, value_down = 1.0, value_up = -1.0, name = _('HMD 2-Pos ON/OFF'), category = {_('Toggle Switches'),_('Instrument Panel')}},

Zip - VEAF :pilotfly:

 

If you want to learn, talk and fly with french-speaking friends, the Virtual European Air Force is here for you ! Meet us on our Discord and our forum

If you're a mission creator, you may want to check the VEAF Mission Creation Tools (and its GitHub repository) a set of open-source scripts and tools that make creating a dynamic mission a breeze !

Link to comment
Share on other sites

As to the flashlight, I have no idea what it is used for.

 

Probably most useful for cold and dark starts in the middle of the night, when you can't find the battery switch, for example. once it is on, the light shines where you point your mouse.

 


Edited by Greyman
Link to comment
Share on other sites

Probably most useful for cold and dark starts in the middle of the night, when you can't find the battery switch, for example. once it is on, the light shines where you point your mouse.

 

"A day where you don't learn anything new, is a wasted day".

Thank you for letting this day not being a wasted day for me. ;)

Link to comment
Share on other sites

  • 3 weeks later...

How to set up toggle switches (a tutorial)

 

Can anyone let me know how to setup a three position switch for the new vr zoom? I want to use the pinky switch on my warthog throttle. Full back-normal view, middle-vr zoom, forward-spyglass zoom.

 

Thanks!

 

 

Sent from my iPad using Tapatalk Pro

Link to comment
Share on other sites

  • Recently Browsing   0 members

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